首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >EWS CreateItem将所有消息创建为草稿

EWS CreateItem将所有消息创建为草稿
EN

Stack Overflow用户
提问于 2012-09-17 22:25:36
回答 3查看 2K关注 0票数 3

根据http://msdn.microsoft.com/en-us/library/exchange/aa566468%28v=exchg.140%29.aspx,我正在尝试使用Exchange Web Services for Exchange2010的CreateItem函数来创建邮件。无论我做什么,邮件总是以草稿的形式出现在Outlook中。下面是我发送的XML:

代码语言:javascript
复制
<?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添加到,但似乎不允许这样做。

EN

回答 3

Stack Overflow用户

发布于 2014-09-18 22:45:47

游戏进行得很晚,但我们有这个问题,这是因为Exchange机器上的存储不足。

票数 0
EN

Stack Overflow用户

发布于 2015-11-18 16:44:35

如果您没有在CreateItem请求上指定PR_MESSAGE_FLAGS扩展属性,则it defaults to MSGFLAG_UNSENT | MSGFLAG_UNMODIFIED (十进制10)。换句话说,未读,未修改的草稿。

代码语言:javascript
复制
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:

代码语言:javascript
复制
  <t:ExtendedProperty> 
    <t:ExtendedFieldURI PropertyTag="3591" PropertyType="Integer" /> 
    <t:Value>1</t:Value> 
  </t:ExtendedProperty>

(扩展属性1Value表示MSGFLAG_READ。)

票数 0
EN

Stack Overflow用户

发布于 2014-10-25 04:06:49

很晚了,但这是今天在找我的时候发现的。

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

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12461407

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档