npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

seslist

v1.5.3-0

Published

Mail list sender (via SES or Mandrill)

Downloads

49

Readme

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": "[email protected]",
	"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.

Additionally you can add attachments key to the meta dictionary which consists of filenames (without path) which will be read from working folder and attached to the email message. Message can address this files (i.e.: as an image sources) by CID which is equals to the filename.

{
	...
	"attachments": ["somepic.jpg", "file.pdf"]
}

All other keys from this JSON will be passed to the email template while rendering particular message.

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","[email protected]"
"Bounce",,"[email protected]"
,"OutOfOffice","[email protected]"
"Complaint","List","[email protected]"
,,"[email protected]"

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 for --run mode] transport setup in json format (see examples below)
  • --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
  • --rate, -z [default: 5] Amazon SES rate limit (emails per second)
  • --run, -r [default: false] if true, emails will be send otherwise they will be rendered to the working directory

Keys file for SES

{
    "accessKeyId": "Your-App-Key-Id",
    "secretAccessKey": "Your-App-Secret-Access-Key"
}

Keys file for Mandrill

{
    "auth": {
        "apiKey": "Your-Mandrill-Api-Key"
    }
}

And you can also combine both:

{
    "accessKeyId": "Your-App-Key-Id",
    "secretAccessKey": "Your-App-Secret-Access-Key",
    "auth": {
        "apiKey": "Your-Mandrill-Api-Key"
    }
}

Changelog

Version 1.5.0

  • Heavily updated dependencies
  • Added Mandrill support (only direct sending, no templates)
  • JSON files now supports commentaries (with double-slash)

Version 1.0.0

  • Switched to nodemailer library instead of AWS-SDK
  • Added email attachments with CID
  • Clarified email task status reporting
  • Test rendering doesn't require AWS keyfile
  • Refreshed dependencies

Prior versions

Long time there was 0.x version. It worked, but wasn't good enough for me. I've decided to release 1.x major release due to various circumstances, but mainly because the tool is tested on about 100 email sending sessions.

Contacts

Feel free to file issues and pull requests via GitHub

License

MIT