![](/img/trans.png)
[英]Office 365 Mail App compose mode - Unable to get email body content in outlook desktop client
[英]The attached email appears in compose mode when open in desktop Outlook
發送之前,我在新郵件上附加了電子郵件。 但是,收到的附件在Outlook Desktop上是可編輯的,而不是在Outlook Web上。 這意味着當我嘗試打開附件時,它會在Outlook桌面中以撰寫模式出現。 我使用createItem創建和發送消息,並使用ItemAttachment放置附件。 我不明白為什么它可以在網絡上運行,而不是在桌面上運行。 這是組成附件的代碼部分:
var soap = '<m:CreateItem MessageDisposition="SendAndSaveCopy">'+ ' <m:Items>' + ' <t:Message>' + ' <t:Subject>' + subject + '</t:Subject>' + ' <t:Body BodyType="HTML">' + body + '</t:Body>' + ' <t:Attachments>' + ' <t:ItemAttachment>' + ' <t:Name>' + attachmentName + '</t:Name>' + ' <t:IsInline>false</t:IsInline>' + ' <t:Message>' + ' <t:MimeContent CharacterSet="UTF-8">' + attachmentMime + '</t:MimeContent>' + ' </t:Message>' + ' </t:ItemAttachment>' + ' </t:Attachments>' + ' <t:ToRecipients><t:Mailbox><t:EmailAddress>' + to + '</t:EmailAddress></t:Mailbox></t:ToRecipients>' + ' </t:Message>' + ' </m:Items>' + '</m:CreateItem>';
謝謝。
您需要在附件上設置PR_MessageFlags擴展屬性https://msdn.microsoft.com/zh-cn/library/ee160304(v=exchg.80).aspx以使其顯示為已發送,例如
<t:Message>
<t:ItemClass>IPM.Note</t:ItemClass>
<t:Subject>subject</t:Subject>
<t:Body BodyType="HTML">body</t:Body>
<t:IsRead>false</t:IsRead>
<t:ExtendedProperty>
<t:ExtendedFieldURI PropertyTag="3591" PropertyType="Integer" />
<t:Value>1</t:Value>
</t:ExtendedProperty>
</t:Message>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.