Hello, I’m using the aws-sdk to send an email notification through SES. When running on dev environment the email is delivered instantly, however, it takes up to 5 minutes to deliver when deployed in production.
Code is pretty basic.
const emailParams = {
Destination: {
ToAddresses: [email],
},
Source: 'Test <admin@test.com>',
Message: {
Body: {
Html: {
Charset: 'UTF-8',
Data: emailTemplate,
},
Text: {
Charset: 'UTF-8',
Data: '',
},
},
Subject: {
Charset: 'UTF-8',
Data: 'Test'
}
},
};
const sendEmail = ses.sendEmail(emailParams).promise();
Where emailTemplate
and email
are strings.
How can I improve the delivery time?
Thanks