发送给EWS的SOAP消息,将其创建为常规邮件,而不是草稿 [英] SOAP Message to EWS to create mail as regular mail, not draft

查看:94
本文介绍了发送给EWS的SOAP消息,将其创建为常规邮件,而不是草稿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在EWS中,您可以创建这样的草稿:

In EWS, you can create a draft like this:

<tns:CreateItem MessageDisposition="SaveOnly">
  <tns:Items>
    <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:Message>
  </tns:Items>
</tns:CreateItem>

我需要添加什么以创建常规消息而不是草稿,就像上面的代码一样(使用SOAP消息,而不是Managed API)?

What do I need to add to create a regular message instead of a draft, as the code above does (using SOAP messages, not the Managed API)?

推荐答案

设置扩展的MessageFlags属性可以解决问题!必须在创建时完成.

Setting the extended MessageFlags property did the trick! Has to be done at creation.

<tns:CreateItem MessageDisposition="SaveOnly">
  <tns:Items>
    <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>
  </tns:Items>
</tns:CreateItem>

这篇关于发送给EWS的SOAP消息,将其创建为常规邮件,而不是草稿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆