node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


Deprecated 19-11-2013, please see nodemailer-strategies


A node.js library for sending e-mail through multiple providers.

The library will send your email through one of the providers you choose. It is latency aware and can be configured to automatically use the most responsive providers and gradually ignore slow providers. Active sender can also fall back and write to disc if all providers fail.

This will help you protect your app against offline email services, and make it easy for you to change between providers or use several providers at the same time.


var activeSender = require('active-sender')
var sender = new activeSender([
            {name:"sendgrid-nodejs", options:{api_user: "", api_key: ""}},
            {name:"aws-ses", options:{accessKeyId: "", secretAccessKey: "", region: "eu-west-1"}},
            {name:"fallback"} ])
sender.send(email, function(err, result){


This library was built to ensure that long running node processes can automatically send emails even though one or several of the email providers become offline. Active sender will try email providers in the order the user has determined. It can also use a latency aware wrapper around several email providers to ensure that the most responsive provider is used, and that unstable providers are quickly ignored.

This design was chosen after SendGrid was victim of a DDoS attack and it became apparent that many webapplications have resilient architecture when it comes to application servers, databases and networking equipment, but not e-mail providers.


Active sender currently supports text and html based emails to a single receiver, without cc, bcc or attachements. If you would like to add support please join the project. The following email senders are supported:

  • Amazon Simple Email Service
  • SendGrid


All contributions are welcome. To get your provider accepted, you need to supply tests and notify the maintainers of any needed credentials to test your provider.