amazon-ses - Nodemailer SES TRANSPORT 错误:“UnexpectedParameter:在参数中找到意外的键 'Destination'”
问题描述
使用来自 Nodemailer 的 SES TRANSPORT 发送 AWS SES 模板化电子邮件时面临问题。
在SES TRANSPORT Documentation中,它说
To use SES transport, set a aws.SES object as the value for SES property in Nodemailer transport options.
这是我的代码的外观。
transporter.sendMail({
ses: {
Destination: {
CcAddresses: [],
ToAddresses: 'recipient@example.com'
},
Source: 'sender@example.com' ,
Template: 'template_name' ,
TemplateData: JSON.stringify(data) ,
// optional extra arguments for SendRawEmail
Tags: [{
Name: 'tag name',
Value: 'tag value'
}]
}
}, (err, info) => {
console.log(info.envelope);
console.log(info.messageId);
});
这是我得到的错误。
2019-08-12T17:03:38.210Z error: There were 3 validation errors:
* UnexpectedParameter: Unexpected key 'Destination' found in params
* UnexpectedParameter: Unexpected key 'Template' found in params
* UnexpectedParameter: Unexpected key 'TemplateData' found in params
解决方案
推荐阅读
- r - 将具有字符和数字的不同大小对象的列表拆分为 R 中的表
- haxe - Openfl Haxe 项目中未找到类型问题
- scikit-learn - 整个数据集的交叉验证和数据的矢量化
- node.js - 在请求中获取客户端域
- xamarin - SkiaSharp ConicTo 方法不绘制曲线
- android - 单击深层链接 url 打开带有红色边框的应用程序
- javascript - 使用 jest 和 supertest 在 Javascript 中使用 async/await 测试数据库插入
- r - 将不同长度的列表列表与固定列表相结合
- android - android 中是否有一个唯一的设备 id,用于类似于cordova 中的 device.uuid 的设备
- c# - 在 Blazor 服务器端使用 HttpClient 获取 StatusCode 407 AuthenticationRequired