【问题标题】:The attached email appears in compose mode when open in desktop Outlook在桌面 Outlook 中打开时,附加的电子邮件以撰写模式显示
【发布时间】:2018-08-01 09:04:40
【问题描述】:

我在发送新邮件之前将其附加到一封电子邮件中。但是,收到的附件在 Outlook 桌面上是可编辑的,而不是在 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>';

谢谢。

【问题讨论】:

    标签: javascript outlook exchangewebservices


    【解决方案1】:

    您需要在附件上设置 PR_MessageFlags 扩展属性 https://msdn.microsoft.com/en-us/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>
    

    【讨论】:

    • 您好,感谢您的回答,效果很好,但没有 和 。
    猜你喜欢
    • 2012-01-16
    • 1970-01-01
    • 2011-12-16
    • 1970-01-01
    • 1970-01-01
    • 2017-05-13
    • 1970-01-01
    • 2015-06-04
    • 1970-01-01
    相关资源
    最近更新 更多