0.0.5 • Published 9 years ago
optune-mailer v0.0.5
optune-mailer
Opinionated package for simplifying mailing via mailgun.com
Preconditions
- CoffeeScript
- A Mailgun account
- Mandrill API Key in Env vars
Installation
npm install optune-mailer --saveUsage
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_KEYLicense
LGPL v3