使用MS Graph API发布邮件时,邮件是在草稿模式下创建的。有没有办法创建一个新的普通邮件消息,而不是草稿?此外,是否有在正文中使用MIME格式发布新消息的选项?
发布于 2019-07-23 00:24:15
创建邮件时,需要设置MessageFlags扩展属性,使其看起来就像是已发送邮件一样。您通常还需要设置ClientSubmitTime https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagclientsubmittime-canonical-property和delivery time https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagmessagedeliverytime-canonical-property,它们会影响邮件在Outlook中的排序方式。因为MIME目前只在测试版中导出,https://developer.microsoft.com/en-us/graph/blogs/mime-format-support-for-microsoft-graph-apis-preview/
{
"Subject": "test1234",
"Sender": {
"EmailAddress": {
"Name": "blah",
"Address": "blah@blah.com"
}
},
"Body": {
"ContentType": "HTML",
"Content": "123Body"
},
"SingleValueExtendedProperties": [
{
"PropertyId": "Integer 0x0E07",
"Value": "1"
},
{
"PropertyId": "SystemTime 0x0039",
"Value": "2019-06-12T10:10:47.2048+10:00"
},
{
"PropertyId": "SystemTime 0x0E06",
"Value": "2019-06-12T10:10:47.2048+10:00"
}
]
}
https://stackoverflow.com/questions/57147653
复制