1.0.1 • Published 7 years ago

node-amazon-ses-simulator v1.0.1

Weekly downloads
72
License
MIT
Repository
github
Last release
7 years ago

node-amazon-ses-simulator

npm version

A local server that simulates responses from Amazon's Simple Email Service (SES).

Screen Shot 2017-02-01 at 03.54.47.png

Getting Started

Install locally and run with:

npm install -D node-amazon-ses-simulator
node ./node_modules/node-amazon-ses-simulator/index.js --help

Otherwise, install globally:

npm install -g node-amazon-ses-simulator
node-amazon-ses-simulator --help

Your server's AWS.SES config will need to point towards the right endpoint:

const ses = new AWS.SES({
    accessKeyId,
    secretAccessKey,
    secretKey,
    region,
    endpoint: 'http://localhost:9999' // See this line
  });

What and why

Put simply - this server will respond with valid XML that Amazon's SDK will accept.

Amazon have their own test server but it isn't free - with the same cost as regular emails. This can be frustrating when you need to test services sending large volumes of emails.

Command line args

This module accepts several arguments. All are optional.

NameTypeDescriptionDefault
-h --hoststringSet the hostnamelocalhost
-p --portnumberSet the port9999
-i --intervalnumberInterval between req reports (ms)1000
-v --validatebooleanShould validate emailsfalse
-e --errornumberPercentage chance of throttling error0