Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

14 Commits

Repository files navigation

mail-queue

A thin wrapper around iron-io/iron_mq_node for queuing up transactional emails.

It does this:

  • JSON.stringify()'s the request message body
  • JSON.parse()s the response message body
  • Returns a Q promise

The available email types and its payload can be found on fiestah/mailer.

Configure Once:

// In app.js bootstrapvarmailq=require('mail-queue');mailq.configure({token: '...',projectId: '...'});

Usage:

All methods return a Q promise, so you can chain them using .then() or .fail() and so on.

// Queue up an email, fire and forget. Logs to stderr if the request failsmailq.post({type: 'planner-welcome',data: '4f70c613d0374f7813000001'// user id});// Clear the queue (useful for tests, automations etc.)mailq.clear().then(function(){// do something}).done();

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages