Angular Send Mail + Attachment с помощью API AzureGraph - PullRequest
0 голосов
/ 04 июля 2019

может кто-нибудь поделиться примером 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)`
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...