通过Outlook REST API更新当前电子邮件项目视图后刷新

时间:2019-02-20 12:27:42

标签: office-js outlook-restapi outlook-web-addins

Office-js:16.0.11215.10000
Mac版Outlook:16.22
操作系统:MacOS High Sierra

我正在使用此REST API请求更新当前的Outlook电子邮件项目:

let restItemId = Office.context.mailbox.convertToRestId(Office.context.mailbox.item.itemId, Office.MailboxEnums.RestVersion.v2_0);    
$http({
  method: 'PATCH',
  url: 'https://outlook.office365.com/api/v2.0/me/messages/' + restItemId,
  headers: {'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json'},
  data: {
    Body: {
        ContentType: 'HTML',
        Content: html_content
    }}
}).then(...);

问题在于,在Outlook Web浏览器客户端中,仅在刷新整个页面后才更新项目内容。在Outlook桌面客户端中,它会在移至其他文件夹并返回后更新。

是否可以通过REST API刷新当前项目的内容,重新加载当前项目或刷新外观?

0 个答案:

没有答案