jorgk's avatar
jorgk
Copper Contributor
Mar 20, 2023
Status:
New

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://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/allow-setting-bodytype-to-html-in-outlook-from-add-in/idi-p/3596975

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:

https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/getting-the-mime-content-of-a-message-from-office-js/idi-p/3045651

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.

 

No CommentsBe the first to comment