尝试通过Microsoft Graph发送电子邮件,其中来自用户邮箱的另一封电子邮件将用作附件。
我正在做的事情类似于:
POST https://graph.microsoft.com/v1.0/me/sendMail HTTP/1.1
authorization: bearer {access_token}
content-type: application/json
content-length: 96
{
"message": {
"subject": "Meet for lunch?",
"body": {
"contentType": "Text",
"content": "The new cafeteria is open."
},
"toRecipients": [{
"emailAddress": {
"address": "garthf@a830edad9050849NDA1.onmicrosoft.com"
}
}],
"attachments": [
"@odata.type": "#Microsoft.OutlookServices.ItemAttachment",
"name": "menu.txt",
"item": {
"id": "some_id"
<!--This is the id of an existing email in User's inbox -->
}
]
},
"saveToSentItems": "false"
}
返回
无法处理抽象类型Microsoft.OutlookServices.Item
的输入
任何人都可以提供建议吗?