Search code examples
office-jsoutlook-web-addins

Set custom header (x-header) on Outlook compose mail with JS addin


I want to set a custom header in Outlook outgoing mail using an Outlook Web Add-in. How can we achieve this?


Solution

  • While Mark's (@MarkLaFleur) answer is correct and indeed the Office.js API doesn't provide any direct functionality to manipulate with transport layer headers, you are able to achieve this. There are two options available for you ...

    UPDATE:

    With Mailbox 1.8 API set new Office.InternetHeaders interface is available to set, get and remove Transport Headers of the message through regular JavaScript API calls.