简体   繁体   English

Microsoft Graph - 发送邮件

[英]Microsoft Graph - Send Mail

I am trying to send an email using Microsoft Graph Send Mail but I keep getting the error below我正在尝试使用 Microsoft Graph 发送邮件发送 email,但我不断收到以下错误

{
  "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"
    }
  }
}

I have followed this post from Microsoft https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http我已经关注了 Microsoft https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http 的这篇文章

Does anyone know if there are additional settings that I need to configure to allow post functions?有谁知道我是否需要配置其他设置以允许发布功能?

Below is my postman request以下是我的 postman 请求

在此处输入图像描述

在此处输入图像描述

The URL is incorrect. URL 不正确。 It should be https://graph.microsoft.com/v1.0/me/sendmail .它应该是https://graph.microsoft.com/v1.0/me/sendmail You've put sendEmail , which is causing the problem.您已经放置sendEmail ,这导致了问题。

The request you are sending is wrong.您发送的请求有误。 The correct request is https://graph.microsoft.com/v1.0/users/<SenderMailId>/sendMail正确的请求是https://graph.microsoft.com/v1.0/users/<SenderMailId>/sendMail

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM