【问题标题】:How to forward an email using Office JS Add-in API?如何使用 Office JS 插件 API 转发电子邮件?
【发布时间】:2018-01-04 13:37:35
【问题描述】:

我正在尝试使用 Office 365 Javascript API for Outlook 开发加载项。我正在使用 Microsoft 的 reference 来寻找在我单击按钮时允许我转发当前打开的电子邮件的方法。问题是引用中没有一种方法可以做到这一点,我如何使用 Office JS API 转发电子邮件?

我想应该是这样的:

var item = Office.context.mailbox.item;  # item represents the currently opened email
item.Forward(email)

【问题讨论】:

    标签: outlook office-js


    【解决方案1】:

    Office.js 中没有转发当前电子邮件的方法。

    另一种解决方案是为此使用 Microsoft Graph。您需要使用Authenticate a user with an single-sign-on token in an Outlook add-in 中列出的步骤注册一个应用程序 ID。

    获得令牌和消息的id 后,您可以调用 Microsoft Graph /forward 端点:

    POST https://graph.microsoft.com/v1.0/me/messages/{id}/forward
    Content-type: application/json
    
    {
      "comment": "",
      "toRecipients": [
        {
          "emailAddress": {
            "name": "recipient-name",
            "address": "recipient-email"
          }
        }
      ]
    }
    

    【讨论】:

    • 这就是我害怕的。真是一团糟,为什么微软总是把简单的事情复杂化? COM 插件不需要所有这些 BS 来完成简单的任务。无论如何,感谢您的帮助!
    • 您可能是唯一拥护 COM 简单性的人。 ;)
    【解决方案2】:

    目前您要求的功能不是产品的一部分。

    但是,我们会在 user-voice page 上跟踪 Outlook 加载项功能请求。请在此处添加您的请求。

    我们在规划过程中会考虑用户语音的功能请求。

    [Outlook 插件工程团队]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-06-17
      • 1970-01-01
      • 2023-03-31
      • 1970-01-01
      • 2015-05-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多