3

我正在尝试按照http://msdn.microsoft.com/en-us/library/exchange/aa566468%28v=exchg.140%29.aspx使用 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>

我尝试将 <t:IsDraft>false</t:IsDraft> 添加到 <t:Message/> 但似乎不允许这样做。

4

3 回答 3

0

游戏迟到了,但我们有这个,这是由于 Exchange 机器上的存储空间不足。

于 2014-09-18T14:45:47.433 回答
0

如果您未在请求中指定PR_MESSAGE_FLAGS扩展属性,则默认为(decimal )。换句话说,一个未读、未修改的草稿。CreateItemMSGFLAG_UNSENT | MSGFLAG_UNMODIFIED10

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.

如果您将以下内容添加到您的请求中<Message>,您将创建一个已读非草稿:

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

(扩展属性的Value手段1MSGFLAG_READ

于 2015-11-18T08:44:35.113 回答
-1

很晚了,但是今天在寻找我时出现了。

MessageDisposition 控制它是否是草稿。你有<CreateItem MessageDisposition="SaveOnly",需要<CreateItem MessageDisposition="SendAndSaveCopy"

于 2014-10-24T20:06:48.757 回答