0

特定の拡張プロパティを持つ電子メールを抽出するために交換と対話しています。新しく作成した拡張プロパティを使用して送信した電子メールを取得できますが、電子メールに返信すると、これらのプロパティは保持されません..これは正常な動作ですか? とにかくそれを回避する方法はありますか?

今のところメールの送信と取得に使用しているコードは次のとおりです

拡張プロパティを使用してメールを送信するには

`<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
      xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010" />
  </soap:Header>
  <soap:Body>
    <m:CreateItem MessageDisposition="SendAndSaveCopy">
      <m:SavedItemFolderId>
        <t:DistinguishedFolderId Id="sentitems" />
      </m:SavedItemFolderId>
      <m:Items>
        <t:Message>
          <t:Subject>Greetings</t:Subject>
          <t:Body BodyType="Text">Message with extended property attached</t:Body>
          <t:ExtendedProperty>
            <t:ExtendedFieldURI PropertySetId="c11ff724-aa03-4555-9952-8fa248a11c3e"
              PropertyName="extended_property_name" PropertyType="String" />
            <t:Value>NEWVALUE</t:Value>
          </t:ExtendedProperty>
          <t:ToRecipients>
            <t:Mailbox>
              <t:EmailAddress>test@cisco.com</t:EmailAddress>
            </t:Mailbox>
          </t:ToRecipients>
        </t:Message>
      </m:Items>
    </m:CreateItem>
  </soap:Body>
</soap:Envelope>`

拡張プロパティでメールを取得する

`<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types"
    xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
    <soapenv:Header>
        <typ:RequestServerVersion Version="Exchange2007_SP1"/>
    </soapenv:Header>
    <soapenv:Body>
        <mes:FindItem Traversal="Shallow">
            <mes:ItemShape>
                <typ:BaseShape>Default</typ:BaseShape>
                <typ:IncludeMimeContent>false</typ:IncludeMimeContent>
                <typ:BodyType>Best</typ:BodyType>
            </mes:ItemShape>
            <mes:IndexedPageItemView MaxEntriesReturned="10" Offset="0" BasePoint="Beginning"/>
         <mes:GroupBy Order="Ascending">
            <typ:FieldURI FieldURI="item:DateTimeReceived" />         
            <typ:AggregateOn Aggregate="Maximum">
               <typ:FieldURI FieldURI="item:ItemId"/> 
            </typ:AggregateOn>
         </mes:GroupBy> 
            <mes:Restriction>
                    <typ:IsEqualTo>
                        <typ:ExtendedFieldURI PropertySetId="c11ff724-aa03-4555-9952-8fa248a11c3e" PropertyName="extended_property_name" PropertyType="String" />
                        <typ:FieldURIOrConstant>
                            <typ:Constant Value="NEWVALUE" />
                        </typ:FieldURIOrConstant>
                    </typ:IsEqualTo>
            </mes:Restriction>
            <mes:ParentFolderIds>
                <!--You have a CHOICE of the next 2 items at this level-->
                <typ:FolderId Id="[Process.Variables.Completed Id]" 
            ChangeKey="[Process.Variables.Completed ChangeKey]"/>
            </mes:ParentFolderIds>
        </mes:FindItem>
    </soapenv:Body>
</soapenv:Envelope>`

どんな助けでも大歓迎です!

ありがとう

4

1 に答える 1

0

はい、それは正常です。拡張プロパティの設定は送信メッセージ用です。応答はまったく新しいメッセージであり、設定したカスタム プロパティは含まれません (これは、実際にはもっと問題になります)。応答と返信を関連付けようとしている場合は、InReplyto、Referances、または ConversationId を確認する必要があります。例: http://blog.mailgun.com/tracking-replies-in-mailgun-or-any-other-email/

乾杯グレン

于 2016-02-16T01:12:53.147 に答える