может кто-нибудь поделиться примером Angular отправки почты с Attachment
Я хочу прикрепить почтовый файл к почте.
Не понимаю, как работает этот "тип ресурса fileAttachment". за
API sendMail
https://docs.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http
https://docs.microsoft.com/en-us/graph/api/resources/fileattachment?view=graph-rest-1.0
пример кода
`mail = {
message: {
subject: 'Reminder',
body: {
contentType: 'Text',
content: "Hi ${empl},"
},
toRecipients: [
{
emailAddress: {
address: empl,
}
}
]
},
attachments : {
"@odata.type": "#microsoft.graph.fileAttachment",
"name": "smile",
"contentBytes": "base64R0lGODdhEAYEAA7"
}
};
return this.http.post('https://graph.microsoft.com/v1.0/me/sendMail', mail)`