我需要使用 Outlook Mail REST API 通过电子邮件将 android 应用程序中的 pin 发送到邮件组。我怎样才能做到这一点?我在文档中找不到任何关于组的信息。
我想避免将管理员用户存储在静态配置文件中,并使用 JSON 内容向“ https://outlook.office.com/api/v2.0/me/sendmail ”发布请求,例如:
{
"Message": {
"Subject": "ADMIN PIN FOR ANDROID APP",
"Body": {
"ContentType": "Text",
"Content": "The secret pin is: 12345"
},
"ToRecipients": [ // ( list generated from config file )
{
"EmailAddress": {
"Address": "user1@company.com"
}
},
{
"EmailAddress": {
"Address": "user2@company.com"
}
}
],
"Attachments": [
{
"@odata.type": "#Microsoft.OutlookServices.FileAttachment",
"Name": "menu.txt",
"ContentBytes": "bWFjIGFuZCBjaGVlc2UgdG9kYXk="
}
]
},
"SaveToSentItems": "false"
}
谢谢