Skip to content
Write newsletters in Markdown and send to many recipients from your machine using AWS SES
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.prettierrc Initial commit Nov 22, 2018
.travis.yml Update .travis.yml Nov 25, 2018
LICENSE Add LICENSE Nov 22, 2018
README.md Update readme Mar 3, 2019
demo.svg Add demo.svg Nov 23, 2018
jest.config.js Initial commit Nov 22, 2018
package-lock.json Update dependency husky to v2 Apr 24, 2019
package.json
renovate.json
tsconfig.json Inline styles Nov 24, 2018
tslint.json

README.md

newsletter-cli npm

newsletter cli demo

Write newsletters in Markdown and send to many recipients from your machine using AWS SES.

Features

✍️ Markdown for writing the content

🌈 Styling using CSS (automatically inlined)

📨 Send using AWS SES respecting rate limits

Prerequisites

Prepare your AWS SES account and configure access to AWS on your machine:

Getting Started

npm i newsletter-cli -g
  • Step 1: Run newsletter prepare to get started. Follow the command's instructions.
  • Step 2: Run newsletter edit <newsletter-name> to open the prepared markdown file for the newsletter using an editor. Write your newsletter!
  • Step 3: Run newsletter preview <newsletter-name> to preview the resulting HTML of your newsletter in a web-browser.
  • Step 4: Run newsletter send <newsletter-name> <recipients-csv> <from-email> to send the newsletter in bulks respecting the send rate of AWS SES.

Parameters

  • <newsletter-name> is the internal name for your newsletter (alphanumerical characters and -, _ only). The newsletter name defines the name of the local file where the newsletter source is stored. is stored as .md
  • <recipients-csv> is the path to a file containing recipients of the newsletter. The file must be comma-separated (,) and must contain column headers in the first row. The column named 'email' must be present in the file
  • <from-email> is the email address which will appear as the sender of the newsletter.

Using variables in the template

You can use variables in the templates as supported by AWS SES. The variables can be used in the subject and inside the body:

---
subject: Hi {{name}}! Subject of your awesome newsletter!
---

Hi {{name}}!

Here goes the text of your awesome newsletter!

In the snippet above, the name column is required for all recipients in the CSV file.

Unfortunately, if the template rendering fails, AWS SES does not return an error. To detect rendering errors, you will need to subscribe to build an async recovery mechanism as described here.

The reasons why template rendering can fail:

  • missing variables
  • typos in variable names
  • invalid template expressions

The CLI tries to validate as much as possible but it's still recommended to set up a recovery mechanism for the rendering failures.

Get Help

Open an issue

You can’t perform that action at this time.