0
votes

Using the "new" office 365 api, is there any way to save a mail item to disk as an .msg file? I'm creating an outlook add-in using the "new" office 365 technology, and i need to save the item out of outlook to put the .msg version into sharepoint.

I've been researching for hours, but no luck.

related question: but the answer for using MailItem.SaveAs refers to the "COM" (old) technology, not the new office 365 api technology. How can I convert an Outlook MailItem object to a byte[]

microsoft documentation https://msdn.microsoft.com/en-us/library/office/jj228679.aspx https://msdn.microsoft.com/en-us/office/office365/api/mail-rest-operations#Createattachments

1

1 Answers

0
votes

You can use EWS to export to an .eml file, but .msg files are only native to Outlook so you'd have to use a third-party converter for that.