1 | # SES transport module for Nodemailer
|
2 |
|
3 | Applies for Nodemailer v1.x and not for v0.x where transports are built-in.
|
4 |
|
5 | ## Usage
|
6 |
|
7 | Install with npm
|
8 |
|
9 | npm install nodemailer-ses-transport
|
10 |
|
11 | Require to your script
|
12 |
|
13 | ```javascript
|
14 | var nodemailer = require('nodemailer');
|
15 | var sesTransport = require('nodemailer-ses-transport');
|
16 | ```
|
17 |
|
18 | Create a Nodemailer transport object
|
19 |
|
20 | ```javascript
|
21 | var transporter = nodemailer.createTransport(sesTransport(options))
|
22 | ```
|
23 |
|
24 | Where
|
25 |
|
26 | * **options** defines connection data
|
27 | * **accessKeyId** - *optional* AWS access key.
|
28 | * **secretAccessKey** - *optional* AWS secret.
|
29 | * **sessionToken** - *optional* session token.
|
30 | * **region** - *optional* Specify the region to send the service request to. Default to *us-east-1*
|
31 | * **rateLimit** - *optional* Specify the amount of messages that [can be sent in 1 second](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). 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.
|
32 |
|
33 | **Example**
|
34 |
|
35 | ```javascript
|
36 | var transport = nodemailer.createTransport(sesTransport({
|
37 | accessKeyId: "AWSACCESSKEY",
|
38 | secretAccessKey: "AWS/Secret/key",
|
39 | rateLimit: 1 // do not send more than 1 message in a second
|
40 | }));
|
41 | ```
|
42 |
|
43 | ## License
|
44 |
|
45 | **MIT**
|