seneca-postmark-mail
Seneca Node.js toolkit
A postmarkapp.com email plugin for theThis module is a plugin for the Seneca framework. It provides email capability for actions. It is a customization of the seneca-mail plugin.
It is a good example of using Seneca action hooks to customize a plugin's behaviour - review the code in lib/postmark.js to see how this works.
For full usage documention, read the seneca-mail page.
This plugin uses postmarkapp.com directly to send email, so you'll need to create an account there to get it working. The postmark module is used to do the heavy lifting.
Support
If you're using this module, feel free to contact me on twitter if you have any questions! :) @rjrodger
Current Version: 0.1.1
Tested on: node 0.10.6, seneca 0.5.6
Quick example
var seneca = require('seneca')() seneca.use('mail')seneca.use('postmark-mail',{ key:'YOUR_POSTMARK_API_KEY'}) seneca.ready(function(err){ if( err ) return console.log(err); seneca.act({ role: 'mail', cmd: 'send', text: 'Hi There!' to: 'alice@example.com', from: 'bob@example.com', subject: 'Greetings!' })})
That's pretty much it.
Install
npm install senecanpm install seneca-mailnpm install seneca-postmark-mail
You'll need the seneca and seneca-mail modules to use this module - it's just a plugin extension.
Test
Copy sendconf.example.js and add real configuration values, and then send a mail with:
cd testnode send-mail.js --seneca.log.print