图形资源管理器中的以下请求可以工作。
https://graph.microsoft.com/v1.0/me/sendMail
{
"message": {
"subject": "Meet for lunch?",
"body": {
"contentType": "Text",
"content": "The new cafeteria is open."
},
"toRecipients": [
{
"emailAddress": {
"address": "vincent@baywet.onmicrosoft.com"
}
}
],
"flag": {
"flagStatus": "flagged"
}
},
"saveToSentItems": "false"
}
具有以下有效负载的同一请求失败
{
"message": {
"subject": "Meet for lunch?",
"body": {
"contentType": "Text",
"content": "The new cafeteria is open."
},
"toRecipients": [
{
"emailAddress": {
"address": "vincent@baywet.onmicrosoft.com"
}
}
],
"flag": {
"flagStatus": "flagged",
"dueDateTime": {
"timeZone": "Pacific Standard Time",
"dateTime": "2019-01-25T19:58:27"
}
}
},
"saveToSentItems": "false"
}
出现以下错误消息
{
"error": {
"code": "ErrorInvalidArgument",
"message": "The request is invalid.",
"innerError": {
"request-id": "5e335c05-071b-4b23-8511-006db9e6e883",
"date": "2019-01-24T20:03:45"
}
}
}
请注意,唯一的区别是以下节点(到期日)
"dueDateTime": {
"timeZone": "Pacific Standard Time",
"dateTime": "2019-01-25T19:58:27"
}
根据
documentation
,我应该通过一个
DateTimeTimeZone
对象,即使这篇特定的文章没有示例,根据
similar examples
.
documentation
以及
known issues
所以
我想知道这个有效负载有什么问题,如何在发送电子邮件时设置带有截止日期的标志