title: Office API, save mail item to disk
body: <p>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.</p>
  
  <p>I've been researching for hours, but no luck.</p>
  
  <p>related question: but the answer for using MailItem.SaveAs refers to the "COM" (old) technology, not the new office 365 api technology.
  <a href="https://stackoverflow.com/questions/32187160/how-can-i-convert-an-outlook-mailitem-object-to-a-byte">How can I convert an Outlook MailItem object to a byte[]</a></p>
  
  <p>microsoft documentation
  <a href="https://msdn.microsoft.com/en-us/library/office/jj228679.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/office/jj228679.aspx</a>
  <a href="https://msdn.microsoft.com/en-us/office/office365/api/mail-rest-operations#Createattachments" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/office/office365/api/mail-rest-operations#Createattachments</a></p>