3

When trying to send a draft, I receive an error:

"ErrorIrresolvableConflict","message":"The send or update operation could not be performed because the change key passed in the request does not match the current change key for the item., Item could not be saved because conflicts were detected when saving.

The message seems to send later when trying in a sandbox.

4

3 回答 3

4

我通过在草稿的创建和发送草稿之间插入超时来解决这个问题。本质上,比赛条件问题。

于 2017-03-30T00:55:14.633 回答
0

CalendarItem.changekey 在创建日历条目和编辑日历条目之间发生变化。我对主题使用过滤器并再次获取 CalendarItem 并对其使用编辑

于 2021-08-06T09:03:53.503 回答
0

使用 office365 发送电子邮件时,添加以下代码以获取 searchkey 以获取将来使用的线程 id(如果未生成线程 id),此代码给出错误 - “发送或更新操作无法执行,因为传入的更改密钥请求与项目的当前更改键不匹配”,如果我附加大小超过 3 MB 的更大文件。

FileAttachment fileAttachment = new FileAttachment( "C:\\send_files\\100 Percent 
Automated Support - NCUCCC.pdf" );// 4.6MB file attached
AttachmentId attachmentId = service.createAttachment( fileAttachment, messageId );
messageId.setChangeKey( attachmentId.getRootItemChangeKey() );

FileAttachment fileAttachment1 = new FileAttachment( "C:\\send_files\\getting-started-with-hadoop-planning-guide.pdf" );// 3.1MB file attached
AttachmentId attachmentId1 = service.createAttachment( fileAttachment1, messageId );


messageId.setChangeKey( attachmentId1.getRootItemChangeKey() );
messageFromDrafts = service.getMessage( messageId );
searchKey = messageFromDrafts.getSearchKey();
service.send( messageId );

下面的代码可以很好地发送带有较大文件附件的电子邮件。所以最好使用此代码发送带有更大文件附件的电子邮件。

ItemInfoResponse response = service.send( messageId );

低于 3 MB 的文件大小作为附件没有任何问题

于 2019-11-20T15:16:52.587 回答