none
EWS on office 365 throw error while sending mail RRS feed

  • Question

  • Hi,

    Our organization has moved to office 365 and we are facing error while sending a mail with attachment. it is working fine without the attachment.

    we have to make some changes to fetch and send mail mail send and below is the solution which we found on google for Impersonation :

    service.HttpHeaders.Add("X-AnchorMailbox", MailboxToAccess);

    even after making the changes we are getting the below error when sending mail with attachment. it work when there is no attachment in the mail.

    <Trace Tag="EwsResponse" Tid="1" Time="2019-01-21 15:10:12Z" Version="15.00.0516.014">
      <?xml version="1.0" encoding="utf-8"?>
      <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Header>
          <h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1537" MinorBuildNumber="31" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
        </s:Header>
        <s:Body>
          <m:CreateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
            <m:ResponseMessages>
              <m:CreateItemResponseMessage ResponseClass="Error">
                <m:MessageText>The specified object was not found in the store., Can't connect to the mailbox of user Mailbox database guid: 483146e9-3363-49d3-b88e-8e04d88d33f8 because the ExchangePrincipal object contains outdated information. The mailbox may have been moved recently.</m:MessageText>
                <m:ResponseCode>ErrorItemNotFound</m:ResponseCode>
                <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
                <m:Items />
              </m:CreateItemResponseMessage>
            </m:ResponseMessages>
          </m:CreateItemResponse>
        </s:Body>
      </s:Envelope>
    </Trace>



    • Edited by Ishu_Chy Monday, January 21, 2019 3:40 PM
    Monday, January 21, 2019 3:38 PM