Microsoft Graph API mail office 365:是否有任何选项创建收件箱消息不是草稿? [英] Microsoft Graph API mail office 365: Is any option create inbox message NOT as Draft?
问题描述
我正在使用 Office 365 邮件 Microsoft Graph API ,尝试按照文档创建新消息:
I'm using office 365 mail Microsoft Graph API , trying to create new message following the Doc:
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/user_post_messages
POST https://graph.microsoft.com/beta/me/messages
Content-type: application/json
{
"subject":"Did you see last night's game?",
"importance":"Low",
"body":{
"contentType":"HTML",
"content":"They were <b>awesome</b>!"
},
"toRecipients":[
{
"emailAddress":{
"address":"AdeleV@contoso.onmicrosoft.com"
}
}
]
}
{输出:
"@odata.context":"https://graph.microsoft.com/beta/$metadata#users('ad787b4f-1fda-4523-8e48-ffedb7f4635f')/messages/$entity",
"@odata.etag":"W/"CQAAABYAAAAmXr9SsE/UR4PcnTZcg7qWAAAFS12t"",
"id":"AAMkAGRWAAAFSmKXAAA=",
"createdDateTime":"2017-12-23T07:29:57Z",
"lastModifiedDateTime":"2017-12-23T07:29:58Z",
"changeKey":"CQAAABYAAAAmXr9SsE/UR4PcnTZcg7qWAAAFS12t",
"categories":[
],
"receivedDateTime":"2017-12-23T07:29:58Z",
"sentDateTime":"2017-12-23T07:29:58Z",
"hasAttachments":false,
"internetMessageId":"<MWHPR130@MWHPR130.namprd13.prod.outlook.com>",
"subject":"Did you see last night's game?",
"bodyPreview":"They were awesome!",
"importance":"low",
"parentFolderId":"AAMkAGRWAAAAAAEPAAA=",
"conversationId":"AAQkAGRVYAsRJrRdc_mWNaxU=",
"conversationIndex":"AQHTe7/VAniOJVgCxEmtF1z6ZY1rFQ==",
"isDeliveryReceiptRequested":false,
"isReadReceiptRequested":false,
"isRead":true,
"isDraft":true,
"webLink":"https://outlook.office365.com/owa/?ItemID=AAMkAGRWAAAFSmKXAAA%3D&exvsurl=1&viewmodel=ReadMessageItem",
"inferenceClassification":"focused",
"unsubscribeData":[
],
我看到的输出是收件箱创建的草稿消息.
The output that I'm seeing is Draft message created in by inbox.
我尝试使用 "isDraft":false 发帖,但不幸的是结果相同:(
I tried to post with "isDraft":false , but the result unfortunately the same :(
基本上我的目的是恢复"原始收件箱消息,这意味着在收件箱中创建它们而不发送....我用 EWS 做到了,现在尝试转换为图形 api
Basically my purpose is "Restore" the original inbox messages , it means create them in Inbox without sending....I Did it with EWS , now trying to convert into graph api
那么,有任何选项可以创建邮件而不是草稿吗?
So, Is Any option to create mail not as Draft ?
P.S:就像在 EWS 中一样https://msdn.microsoft.com/en-us/library/ms527503(v=exchg.10).aspx
P.S: like in EWS https://msdn.microsoft.com/en-us/library/ms527503(v=exchg.10).aspx
非常感谢
推荐答案
@David 提到的最终解决方案是通过扩展属性:
The final solution as @David mentioned is via Extended properties:
根据:
和:
https://msdn.microsoft.com/en-us/office/office365/api/extended-properties-rest-operations
https://msdn.microsoft.com/en-us/library/ee218129(v=exchg.80).aspx
"singleValueExtendedProperties": [
{
"id":"Integer 0x0E07",
"value":"4"
}
]
}
这篇关于Microsoft Graph API mail office 365:是否有任何选项创建收件箱消息不是草稿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!