0.0.5 • Published 7 years ago

optune-mailer v0.0.5

Weekly downloads
3
License
LGPL 3
Repository
github
Last release
7 years ago

optune-mailer

Opinionated package for simplifying mailing via mailgun.com

Codeship Status for optune/optune-mailer

Preconditions

  1. CoffeeScript
  2. A Mailgun account
  3. Mandrill API Key in Env vars

Installation

npm install optune-mailer --save

Usage

mailer = require 'optune-mailer'

mailer.sendText 'Debug <debug@optune.me>', 'Test subject', 'Test body', callback

# Events:
mailer.on 'send', (opts) ->
    console.log opts
    # opts:
    #   from: ...
    #   to: ...
    #   subject: ...
    #   text or html: ...

Expected ENV Vars

(For testing, put a .env file in the root with the following content)

MAILGUN_APIKEY=YOUR_MAILGUN_API_KEY

License

LGPL v3