SES transport module for Nodemailer
Applies for Nodemailer v1.x and not for v0.x where transports are built-in.
Usage
Install with npm
npm install nodemailer-ses-transport
Require to your script
var nodemailer = require('nodemailer');
var sesTransport = require('nodemailer-ses-transport');
Create a Nodemailer transport object
var transporter = nodemailer.createTransport(sesTransport(options))
Where
- options defines connection data
- accessKeyId - optional AWS access key.
- secretAccessKey - optional AWS secret.
- sessionToken - optional session token.
- region - optional Specify the region to send the service request to. Default to us-east-1
- httpOptions - A set of options to pass to the low-level AWS HTTP request. See options in the AWS-SES docs.
- rateLimit - optional Specify the amount of messages that can be sent in 1 second. For example if you want to send at most 5 messages in a second, set this value to 5. If you do not set it, rate limiting is not applied and messages are sent out immediatelly.
Example
var transport = nodemailer.createTransport(sesTransport({
accessKeyId: "AWSACCESSKEY",
secretAccessKey: "AWS/Secret/key",
rateLimit: 1
}));
License
MIT