I am using SOAP messages to get emails from mailbox on Exchange Server 2013. I need to extract attached file(s) from emails. I have retrieved the attachment Ids and Email ids using finditems, getitem and getattachment; but I cannot find the right EWS method to use to extract the attachment using XML message. Has anyone ever done this? Thanks for your input.
1 Answers
0
votes
You download an Attachment once you have the AttachmentId using the GetAttachment operation https://msdn.microsoft.com/en-us/library/office/aa494316(v=exchg.150).aspx. Are you asking how to decode what is returned ? if that the case just convert the Base64String to a ByteArray and thats the file content. eg in C#
File.WriteAllBytes("c:\temp\filename.bbb",Convert.FromBase64String(AttachmentContent));