When I make a call to ses.sendEmail the promise is never called. This is function in my lambda layer being called by my lambda function.
Here's the sendEmail function I have..
var aws = require ('aws-sdk')
var ses = new aws.SES ({region: 'us-west-2'});
exports.sendEmail = async (to, from, subject, body) => {
var params = {
Destination: {
ToAddresses : [to]
},
Message: {
Body: {
Html: {
Charset: "UTF-8",
Data : body
}
},
Subject: {
Charset: "UTF-8",
Data : subject
}
},
Source: from
}
console.log ("Sending email with params (stringify) : ", JSON.stringify(params));
console.log ("SES = ", ses);
await ses.sendEmail (params, function (err, data) {
console.log ("inside email");
});
}
I see the "Sending email with params (stringify)" log output and the "SES = " log output (which shows what appears to be a valid SES). But I never see "inside email" in the log nor do I receive any emails.
I'm also outside of the ses sandbox as I've gotten approval after setting up my domain and successfully verifying it all. I am on the us-west-2 region. I have not verified any email addresses. Just the domain (ie. name@user.host... user.host is verified) as I assumed if the domain is verified then any email from that domain should be good for use in the "from".