根据http://msdn.microsoft.com/en-us/library/exchange/aa566468%28v=exchg.140%29.aspx,我正在尝试使用Exchange Web Services for Exchange2010的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>我尝试将false添加到,但似乎不允许这样做。
发布于 2014-09-18 22:45:47
游戏进行得很晚,但我们有这个问题,这是因为Exchange机器上的存储不足。
发布于 2015-11-18 16:44:35
如果您没有在CreateItem请求上指定PR_MESSAGE_FLAGS扩展属性,则it defaults to MSGFLAG_UNSENT | MSGFLAG_UNMODIFIED (十进制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.如果您将以下内容添加到请求的<Message>中,那么您将创建一个read - non-draft:
<t:ExtendedProperty>
<t:ExtendedFieldURI PropertyTag="3591" PropertyType="Integer" />
<t:Value>1</t:Value>
</t:ExtendedProperty>(扩展属性1的Value表示MSGFLAG_READ。)
发布于 2014-10-25 04:06:49
很晚了,但这是今天在找我的时候发现的。
MessageDisposition控制它是否是草稿。你有<CreateItem MessageDisposition="SaveOnly",需要是<CreateItem MessageDisposition="SendAndSaveCopy"
https://stackoverflow.com/questions/12461407
复制相似问题