【发布时间】:2018-10-07 01:23:40
【问题描述】:
我想使用 SendGrid 从 Azure 函数 (Javascript) 发送带有附件的电子邮件。我做了以下
- 为 SendGrid API Key 创建了一个新的 AppSettings
- Azure Function 的 SendGrid 输出绑定集
-
以下是我的 Azure 函数
module.exports = function (context, myQueueItem) { var message = { "personalizations": [ { "to": [ { "email": "testto@test.com" } ] } ], from: { email: "testfrom@test.com" }, subject: "Azure news", content: [{ type: 'text/plain', value: myQueueItem }] }; context.done(null, {message}); };
电子邮件正在正确发送。但是如何添加附件呢?
【问题讨论】:
标签: javascript azure azure-functions sendgrid