Outlook 2013转发邮件生成无效attachmentID致EWS GetAttachment()操作失败
确认Outlook 2013(15.0.5023.1000 64位)转发邮件时的AttachmentID无效Bug
没错,你碰到的这个问题确实是Outlook 2013特定版本(15.0.5023.1000 64位)存在的一个已知产品bug,具体表现为转发邮件时生成的附件AttachmentID无效,导致EWS的GetAttachment()操作失败。
根据你测试的情况,这里可以总结出几个关键规律:
- 跨版本访问差异:同一封由Outlook 2013转发的邮件,在Outlook 2016中访问时,AttachmentID是有效的,能正常执行
GetAttachment()操作; - 正向场景验证:使用Outlook 2016转发的邮件,无论在Outlook 2013还是2016环境下,都能通过EWS正常获取附件;
- AttachmentID一致性例外:通常同一附件在Outlook 2013与2016中的AttachmentID是一致的,但仅当邮件由Outlook 2013转发时,二者生成的AttachmentID会出现差异——其中Outlook 2013生成的ID是无效的,而Outlook 2016生成的ID可以正常使用。
EWS返回的错误响应:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="669" MinorBuildNumber="32" Version="V2016_07_13" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <m:GetAttachmentResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> <m:ResponseMessages> <m:GetAttachmentResponseMessage ResponseClass="Error"> <m:MessageText>The specified attachment Id is invalid.</m:MessageText> <m:ResponseCode>ErrorInvalidAttachmentId</m:ResponseCode> <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey> <m:Attachments /> </m:GetAttachmentResponseMessage> </m:ResponseMessages> </m:GetAttachmentResponse> </s:Body> </s:Envelope>
内容的提问来源于stack exchange,提问作者fullstack
相关产品推荐
相关产品推荐

