使用 JS 插件在 Outlook 上设置自定义 header (x-header) 撰写邮件
Set custom header (x-header) on Outlook compose mail with JS addin
我想使用 Outlook Web Add-in 在 Outlook 外发邮件中设置自定义 header。我们怎样才能做到这一点?
我假设你的意思是 "custom" header。这是不可能从 add-in 做到的。 Add-ins 仅扩展用户体验,它们没有连接到底层传输管道。
虽然 Mark (@MarkLaFleur) 的回答是正确的,而且 Office.js API 确实没有提供任何直接操作传输层 headers 的功能,但您可以实现这个。您有两种选择 ...
- Office.context.mailbox.makeEwsRequestAsync() gives you ability to send EWS request to Exchange server and get/set properties of the item, including x-headers (which is just yet another property; refer to distinguished property "InternetHeaders", corresponding to Id
{00020386-0000-0000-C000-000000000046}
). Please see the example on github: Make an Exchange Web Service request from Outlook
- 对 restUrl with appropriate query to set/get the properties of the item. The example of such request you may find: Set a custom header with Outlook/Office 365 REST
进行 REST API 调用
更新:
使用 Mailbox 1.8 API 设置新的 Office.InternetHeaders 界面可用于通过常规 JavaScript API 设置、获取和删除邮件的传输 Headers来电。
header无法通过outlook js自定义api。在什么情况下,需要它?谢谢
我想使用 Outlook Web Add-in 在 Outlook 外发邮件中设置自定义 header。我们怎样才能做到这一点?
我假设你的意思是 "custom" header。这是不可能从 add-in 做到的。 Add-ins 仅扩展用户体验,它们没有连接到底层传输管道。
虽然 Mark (@MarkLaFleur) 的回答是正确的,而且 Office.js API 确实没有提供任何直接操作传输层 headers 的功能,但您可以实现这个。您有两种选择 ...
- Office.context.mailbox.makeEwsRequestAsync() gives you ability to send EWS request to Exchange server and get/set properties of the item, including x-headers (which is just yet another property; refer to distinguished property "InternetHeaders", corresponding to Id
{00020386-0000-0000-C000-000000000046}
). Please see the example on github: Make an Exchange Web Service request from Outlook - 对 restUrl with appropriate query to set/get the properties of the item. The example of such request you may find: Set a custom header with Outlook/Office 365 REST 进行 REST API 调用
更新:
使用 Mailbox 1.8 API 设置新的 Office.InternetHeaders 界面可用于通过常规 JavaScript API 设置、获取和删除邮件的传输 Headers来电。
header无法通过outlook js自定义api。在什么情况下,需要它?谢谢