【问题标题】:Outlook API: Receiving 'ErrorIrresolvableConflict' when trying to send Draft [closed]Outlook API:尝试发送草稿时收到“ErrorIrresolvableConflict”[关闭]
【发布时间】:2017-03-29 22:13:11
【问题描述】:

尝试发送草稿时,我收到错误消息:

"ErrorIrresolvableConflict","message":"由于请求中传递的更改键与项目的当前更改键不匹配,无法执行发送或更新操作。由于检测到冲突,无法保存项目保存时。

在沙盒中尝试时,该消息似乎稍后发送。

【问题讨论】:

    标签: outlook outlook-api


    【解决方案1】:

    我通过在草稿创建和发送草稿之间插入超时来解决此问题。本质上是竞争条件问题。

    【讨论】:

      【解决方案2】:

      使用 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 作为附件不会有任何问题

      【讨论】:

        【解决方案3】:

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

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2014-09-03
          • 2018-02-26
          • 1970-01-01
          • 2022-08-04
          • 1970-01-01
          • 2018-01-16
          • 2021-07-23
          • 1970-01-01
          相关资源
          最近更新 更多