Skip to content
Afa' Afa'

Project

Newsletter SES

Send newsletters using AWS SES

45 commits 2 contributors Updated Jun 2018

Overview

Send newsletters using AWS SES

  1. Install
  2. Config format
  3. CLI usage
  4. Programmatic usage
  5. License

Install

shell
# to install as a dependency
npm install --save newsletter-ses

# to install the binary
npm install -g newsletter-ses

The config format

The configuration format:

js
const config = {
    "ses": {
        "accessKeyId": "7187fa1fcf3211e6",
        "secretAccessKey": "7187fa1f-cf32-11e6-8edf+e3d56a8d0e0",
        "region": "eu-west-1"
    },
    "lists": [
        {
            // The optional newsletter ID
            "id": "newsletter-test-1",
            // The newsletter name. used as fallback dubject
            "name": "Newsletter Test List #1",
            // The newsletter sender (from)
            "sender": "newsletter@example.com",
            // The list for members
            "members": [
                "test1@example.com",
                "test2@example.com"
            ],
            // message to send
            "message": {
                "subject": "Hello, World",
                "html": "The newsletter body in HTML",
                "plain": "The newsletter body in Plain Text"
            }
        },
        {
            "id": "newsletter-test-2",
            "name": "Newsletter Test List #2",
            "sender": "newsletter@example.com",
            "members": [ "test@example.com" ],
            "message": {
                // Node the missing subject field:
                // it will be generate from the  tag in the HTML content
                "html": `


                            Hello, World!


                            The newsletter body in HTML

                    `,
                "plain": "The newsletter body in Plain Text"
            }
        },
        {
            "id": "newsletter-test-3",
            "name": "Newsletter Test List #3",
            "sender": "newsletter@example.com",
            "members": [ "test@example.com" ],
            "message": {
                "html": `


                            Hello, World!


                            The newsletter body in HTML

                    `
                // Note the missing 'plain' field:
                // it will be generate from the HTML content
            }
        },
        {
            "id": "newsletter-test-4",
            "name": "Newsletter Test List #4",
            "sender": "newsletter@example.com",
            "members": [ "test@example.com" ],
            // You can pass your message directly as a string.
            // The message.subject and message.plain will be generate
            "message": `


                        Hello, World!


                        The newsletter body in HTML

                `
        }
    ]
}

Technology

  • JavaScript

Repository information

Primary language
JavaScript
Created
June 4, 2018
Last activity
June 26, 2018

Activity

Daily commits on the default branch, across the whole project history.

Daily commit activity over the project's whole history. Each cell is one day; darker cells mean more commits.
Mon Wed Fri

Contributors

  • S
  • S

Search articles and projects

Type to filter articles and projects. Use the arrow keys to move through results and Enter to open one. Press Escape to close.