【发布时间】:2019-01-24 21:11:18
【问题描述】:
我正在尝试发送一封带有截止日期标志的电子邮件。
图资源管理器中的以下请求有效。
发布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 中没有列出任何限制,所以 我想知道这个有效负载有什么问题,如何在发送电子邮件时设置一个带有截止日期的标志?
【问题讨论】:
-
我尝试指定首选 Outlook 时区标题,看看是否有帮助。它没有改变任何东西
-
您能否具体说明从 Microsoft Graph 返回的响应标头,而不仅仅是响应正文?
-
client-request-id: 3f26a733-71b2-42bb-8d56-8f44d7eeb0d7 content-type: application/json cache-control: private request-id: 3f26a733-71b2-42bb-8d56-8f44d7eeb0d7跨度>