Search code examples
javascriptemailoutlookoffice-addinsmailto

Outlook Office Add-In Integration with Third-Party Web Application - alternative to mailto links to support attachments and HTML body


From our web application running in company network, I'm looking for an alternative way of "mailto" approach (since "mailto" supports plain text only for the body section and has no attachment support) for opening up a new message (email) popup in Outlook (company uses Outlook). I'm trying to implement this by JavaScript.

After some search, I think I have 2 options available:

  1. Handling mail sending operation via our web application by opening a send mail popup, including attachment and nice looking html body template,
  2. Trying to integrate our web application with an Outlook office add-in

This web application is for purchasing department and Outlook usage of them is high.

If option 1 has been chosen, I think there will be a need to present previous mail recipient suggestions and sent mail history page.

I'm not exactly sure that option 2 can be implemented, or provided by Outlook.

Any suggestions will be highly appreciated. Many thanks in advance.


Solution

  • IMHO the only reliable way to show a new message in Outlook from a browser other than IE is to dynamically create an EML (MIME) file with HTML body and attachments populated. Just make sure to add "X-Unsent: 1" MIME header to show the message as draft and avoid populating From/Sender MIME headers.