邮件:发送message: send

在草稿箱文件夹中发送邮件。邮件草稿可以是新邮件草稿、答复草稿、全部答复草稿或转发草稿。然后邮件保存在已发送邮件文件夹中。Send a message in the draft folder. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. The message is then saved in the Sent Items folder.

权限Permissions

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) Mail.SendMail.Send
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) Mail.SendMail.Send
应用程序Application Mail.SendMail.Send

HTTP 请求HTTP request

POST /me/messages/{id}/send
POST /users/{id | userPrincipalName}/messages/{id}/send

请求标头Request headers

名称Name 类型Type 说明Description
AuthorizationAuthorization stringstring Bearer {token}。必需。Bearer {token}. Required.
Content-LengthContent-Length numbernumber 0。必需。0. Required.

请求正文Request body

响应Response

如果成功,此方法返回 202 Accepted 响应代码。它不在响应正文中返回任何内容。If successful, this method returns 202 Accepted response code. It does not return anything in the response body.

示例Example

以下示例演示如何调用此 API。The following example shows how to call this API.

请求Request

下面是一个请求示例。Here is an example of the request.

POST https://graph.microsoft.com/v1.0/me/messages/{id}/send
响应Response

下面是一个响应示例。Here is an example of the response.

HTTP/1.1 202 Accepted