Exchange Web 服务 - 发送电子邮件错误 "item is out of date"

Exchange Web Services - sending email error "item is out of date"

我有通过 EWS 发送电子邮件的代码(它必须读取收到的电子邮件并移动消息,因此通过 EWS 而不是 SMTP 发送在某种程度上是有意义的)。 95% 的时间它都有效,但偶尔我会收到一条错误消息: "The operation can't be performed because the item is out of date. Reload the item and try again."

我已经将电子邮件保存在“已发送邮件”文件夹中,然后在尝试发送之前调用 Bind() 重新加载邮件。对正在发生的事情以及为什么有任何见解?另外,由于 Bind() 没有重新加载消息,如何避免或恢复?

I already am saving the email in the Sent Items folder and then calling Bind() to reload the message before trying to send

为什么要在发送前将其保存到 Sentitems 文件夹?最好使用草稿文件夹,因为许多不同的东西可能会与其他文件夹同步(包括 Office365 中的底层进程)。听起来 changekey 已经过时了,可能是因为另一个进程对已发送的消息进行了更改。