seslist

SES mail list sender

npm install seslist
20 downloads in the last month

Amazon SES mail list sender

Sometimes it is necessary to send mail list via the tough channel like Amazon Simple Email Services. Just to be sure that emails will arrive to the user's mailboxes and arrive perfectly in time. No matter how much does it cost.

This software tends to realize this need.

Installation

[sudo] npm install -g seslist

Preparation and usage

  1. Make sure you have copied sample_keys.json to anothe file and filled it with correct credentials

  2. Create a working folder

    mkdir workingFld cd workingFld

  3. Create meta.json and edit it according to this instruction (see below)

  4. Create queue.csv and fill it with your mailing list queue settings (see below)

  5. (optional) Run seslist without -r option to generate email messages and save them to files (prefixed with out_) rather than sending

  6. Run with -r option to perform mail list sending operation

meta.json

JSON-file which should contain two keys: from which is sender's email address and subject which is a mail message subject.

{
    "from": "greg@sitnin.com",
    "name": "Gregory Sitnin"
    "subject": "This is a mailing list"
}

This file also may contain any number of additional keys which will be passed to the template renderer.

queue.csv

Should contain CSV-data with field names on a first row. email field is required, all other is optional. Every key from row will be passed to the template engine while generating email messages.

"name","surname","email"
"Success","Target","success@simulator.amazonses.com"
"Bounce",,"bounce@simulator.amazonses.com"
,"OutOfOffice","ooto@simulator.amazonses.com"
"Complaint","List","complaint@simulator.amazonses.com"
,,"suppressionlist@simulator.amazonses.com"

Usage

seslist --workdir <directory> --queuefile <filename> --keyfile <filename> [--queuefile <filename>] [--template <filename>] [--timeout <ms>] [--run]

Options:

  • --workdir, -d [required] working directory path (should contain meta.json, template and queue files)
  • --keyfile, -k [required] amazon ses keys in a json format (look at sample_keys.json)
  • --queuefile, -q [default: "queue.csv"] CSV-file whith the maillist variables (should contain email field)
  • --template, -t [default: "template.html"] nunjucks/jinja2 template file to render emails
  • --timeout, -t [default: 1000] timeout between email sendings (in milliseconds), for sending rate control
  • --run, -r [default: false] if true, emails will be send otherwise they will be rendered to the working directory

Contacts

Feel free to file issues and pull requests via GitHub

License

MIT

npm loves you