var credentials = {
accessKeyId: "AMAZON accessKeyId",
secretAccessKey: "secretAccessKey accessKey"
};
AWS.config.update(credentials);
AWS.config.region = 'ap-southeast-1';
var sesv2 = new AWS.SESV2();
var params = {
Content: {
Simple: {
Body: {
Html: {
Data: '邮件内容',
Charset: 'UTF-8'
}
},
Subject: {
Data: '邮件主题',
Charset: 'UTF-8'
}
}
},
Destination: { ToAddresses: ['xxxx 收件人 [email protected]'] },
FromEmailAddress: '发件人 xxxx',
FromEmailAddressIdentityArn: '发件人 ARN',
};
sesv2.sendEmail(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
1
Kasumi20 2022-02-15 16:04:15 +08:00
Uncaught ReferenceError: AWS is not defined
|
2
yasea OP @Kasumi20 需要引用 amazon 的 JS SDK 文件, 替换 credentials 信息(换成自己的 amazon 帐号内容)
|
3
Michelangelono 2022-02-16 08:35:19 +08:00 via Android
免费多大额度?
|
4
yasea OP @Michelangelono
Amazon EC2 中的应用程序发送电子邮件, 每月前 62000 封电子邮件免费,之后每发送 1000 封电子邮件 0.10 USD |
5
damngoto 2022-02-16 10:10:16 +08:00
不如发个链接?
|
6
yasea OP |
7
asdfzxh 2023-11-20 03:39:34 +08:00
no such thing as cxy, not defined by some tech or whatever
|