A simple Amazon SES wrapper, supports the following actions:
DeleteVerifiedEmailAddress
GetSendQuota
GetSendStatistics
ListVerifiedEmailAddresses
SendEmail
VerifyEmailAddress
Does not currently support SendRawEmail
.
npm install amazon-ses-mailer
Verify the source email address with Amazon.
var AmazonSES = require('amazon-ses-mailer');
var ses = new AmazonSES('access-key-id', 'secret-access-key', 'region');
ses.verifyEmailAddress('[email protected]');
You will receive a confirmation email - click the link in that email to finish the verification process.
ses.send({
from: 'Foo <[email protected]>'
, to: ['[email protected]', '[email protected]']
, replyTo: ['[email protected]']
, subject: 'Test subject'
, body: {
text: 'This is the text of the message.'
, html: 'This is the <b>html</b> body of the message.'
}
});
ses.listVerifiedEmailAddresses(function(result) {
console.log(result);
});
ses.deleteVerifiedEmailAddress('[email protected]', function(result) {
console.log(result);
});
ses.getSendQuota(function(result) {
console.log(result);
});
ses.getSendStatistics(function(result) {
console.log(result);
});