Exchange server EWS CreateItem将所有邮件创建为草稿

Exchange server EWS CreateItem将所有邮件创建为草稿,exchange-server,exchangewebservices,Exchange Server,Exchangewebservices,我正在尝试使用Exchange Web Services for Exchange 2010的CreateItem函数创建消息。无论我做什么,邮件总是以草稿的形式出现在Outlook中。以下是我要发送的XML: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.mi

我正在尝试使用Exchange Web Services for Exchange 2010的CreateItem函数创建消息。无论我做什么,邮件总是以草稿的形式出现在Outlook中。以下是我要发送的XML:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010_SP1"/>
  </soap:Header>
  <soap:Body>
    <CreateItem MessageDisposition="SaveOnly" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <SavedItemFolderId>
        <t:FolderId ChangeKey="..." Id="..."/>
      </SavedItemFolderId>
      <Items>
        <t:Message>
          <t:MimeContent CharacterSet="UTF-8">BASE64 ENCODED MESSAGE</t:MimeContent>
          <t:ItemClass>IPM.Note</t:ItemClass>
          <t:Subject>THE SUBJECT LINE</t:Subject>
          <t:Sensitivity>Normal</t:Sensitivity>
          <t:Importance>Normal</t:Importance>
          <t:Culture>en-US</t:Culture>
          <t:IsRead>true</t:IsRead>
        </t:Message>
      </Items>
    </CreateItem>
  </soap:Body>
</soap:Envelope>

BASE64编码消息
IPM.注
主题行
正常的
正常的
恩美
真的

我已尝试向添加一个false,但这似乎是不允许的。

游戏进行得晚了,但我们有此功能,这是由于Exchange机器上的存储不足。

很晚了,但今天在搜索我时出现了此功能


MessageDisposition控制是否为草稿。如果未在
CreateItem
请求上指定
PR\u MESSAGE\u FLAGS
扩展属性(十进制
10
),则具有
。换句话说,一份未读、未修改的草稿

The initial values for this property are typically MSGFLAG_UNSENT
and MSGFLAG_UNMODIFIED to indicate a message that has not yet been
sent or changed. When a message is saved for the second time, the
message store provider clears the MSGFLAG_UNMODIFIED flag.
如果将以下内容添加到请求的
,您将创建一个只读非草稿:

  <t:ExtendedProperty> 
    <t:ExtendedFieldURI PropertyTag="3591" PropertyType="Integer" /> 
    <t:Value>1</t:Value> 
  </t:ExtendedProperty>

1.

(扩展属性
1
表示
MSGFLAG\u READ

请发布其余代码,这些代码随后会与消息项交互。特别是处理WebService和MessageItem的部分将不再有用。它是Perl,我使用LibXML和LWP编写了它。我没有使用C#托管API或任何其他知名库。上面的XML已发布,并正确创建了消息。问题是,在Outlook中查看邮件时,邮件显示为草稿。可能的副本将发送邮件并保存已发送邮件副本,而不是保存非草稿。