I am using aws-sdk using Node to send AWS SES emails and I was able to successfully send emails using AWS CLI. However, from my Node script, verification for my email fails for some reason.
Below is the code:
const aws = require('aws-sdk')
const ses = new aws.SES()
const message = {
Destination: {
ToAddresses: ['[email protected]']
},
Message: {
Body: {
Text: {
Charset: 'UTF-8',
Data: 'Test body'
}
},
Subject: {
Charset: 'UTF-8',
Data: 'Test subject'
}
},
Source: '[email protected]'
}
ses.sendEmail(message, function (err, data) {
if (err) console.log(err);
else console.log(data);
});
Below is the error:
message: 'Email address is not verified. The following identities failed the check in region US-EAST-1: [email protected]',
code: 'MessageRejected',
time: 2017-12-15T15:37:26.312Z,
requestId: 'random-id',
statusCode: 400,
retryable: false,
retryDelay: 15.030260565173382
Please help! Thank you!
[email protected]
-- is your actual email address an SES verified sender in the us-east-1 region? – Anthony Neace