Novelty Palliates Malaise
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    seneca-postmark-mailpublic

    seneca-postmark-mail

    A postmarkapp.com email plugin for the Seneca Node.js toolkit

    This 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

    Build Status

    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 seneca
    npm install seneca-mail
    npm 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 test
    node send-mail.js --seneca.log.print

    Keywords

    none

    install

    npm i seneca-postmark-mail

    Downloadsweekly downloads

    2

    version

    0.1.1

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar