Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

SOAP XML Request for EWS Managed API to send a attachment along with email message.

$
0
0

Hi,

I could send an email and save its copy in sent items folder using  XML  Soap for SendAndSaveCopy.  Its XML Soap degails are given under " Creating and sending email messages by using the EWS Managed API"  subject. 

But I need to send an text file available on my desktop (c:\desktop\SampleFile.txt) along with the email .   I couldn't find its XML Soap  request. 

I tried with the following XML given below ( sample xml is available at topic "CreateAttachment Operation").   I am deleting the URL part, because I couldn't submit this request with URLs

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi=""
               xmlns:xsd=""
               xmlns:soap=""
               xmlns:t="">
<soap:Body>
  <CreateAttachment xmlns=""
                    xmlns:t="">
    <ParentItemId Id="AAAfAENhYWdJb" ChangeKey="CQAAABYA"/>
    <Attachments>
      <t:FileAttachment>
        <t:Name>C:\Users\Desktop\SampleAttachment3.txt</t:Name>
        <t:Content>SampleAttachment</t:Content>
      </t:FileAttachment>
    </Attachments>
  </CreateAttachment>
</soap:Body>
</soap:Envelope>

It is attaching a junk file to the existing email  which is available in my inbox (existing email Item id = AAAfAENhYWdJb = ParentItemId in xml input ) .   It is not taking file from my desktop and attaching to the email. 

Can anyone help me with that to check with SOAP UI.

Thank you.




Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>