Implement Outlook JS API to control the MIME structure of a message being sent
We're trying to port our Outlook COM/VSTO add-in to the Outlook JS API. Our add-on currently creates S/MIME messages and takes advantage of the fact that MAPI properties of MailItem can be set, for example MapiProperty.PidTagMessageClass can be set to "IPM.Note.SMIME.MultipartSigned".
There are APIs to set body and attachments of an item (body.getAsync, body.setAsync, addFileAttachmentFromBase64Async, removeAttachmentAsync), but there doesn't appear to be APIs to manipulate the MIME structure of a message.
This request also goes into this direction:
https://github.com/OfficeDev/office-js/issues/2767
Apparently the reporter wants to determine whether a message is sent as "text/plain" or "text/html" or "multipart/alternative" with both "text/plain" and "text/html" parts.
This request also relates to MIME:
The reporter needs the MIME content of the message. We on the other hand would like to set the MIME content of a message.
Note that APIs like this exist for OWA: To get the MIME content, the GetItem call returns an object with a MimeContent property. For sending a message. one can specify the MIME content in the MimeContent property of the (mial) item for the CreateItem call.