首页 > 解决方案 > Microsoft Graph - 发送邮件

问题描述

我正在尝试使用 Microsoft Graph Send Mail 发送电子邮件,但我不断收到以下错误

{
  "error": {
    "code": "Request_BadRequest",
    "message": "Specified HTTP method is not allowed for the request target.",
    "innerError": {
      "date": "2020-06-19T07:06:42",
      "request-id": "xxx-xxxx-xxxx-xxxx-xxxx"
    }
  }
}

我已经关注了微软的这篇文章https://docs.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http

有谁知道我是否需要配置其他设置以允许发布功能?

以下是我的邮递员要求

在此处输入图像描述

在此处输入图像描述

标签: azuremicrosoft-graph-apimicrosoft-graph-mail

解决方案


网址不正确。它应该是https://graph.microsoft.com/v1.0/me/sendmail。你放了sendEmail,这是导致问题的原因。


推荐阅读