/nodemailer-mandrill-transport

Mandrill transport for Nodemailer

Primary LanguageJavaScriptISC LicenseISC

nodemailer-mandrill-transport

A Mandrill transport for Nodemailer.

Build Status NPM version

Example

'use strict';

var nodemailer = require('nodemailer');

var mandrillTransport = require('nodemailer-mandrill-transport');

var transport = nodemailer.createTransport(mandrillTransport({
  auth: {
    apiKey: 'key'
  }
}));

transport.sendMail({
  from: 'sender@example.com',
  to: 'user@example.com',
  subject: 'Hello',
  html: '<p>How are you?</p>'
}, function(err, info) {
  if (err) {
    console.error(err);
  } else {
    console.log(info);
  }
});

Documentation

mandrillTransport

mandrillTransport(options);

Available options

  • async
  • tags
  • metadata
  • recipient_metadata
  • preserve_recipients

sendMail

transport.sendMail(options, function(err, info) {});

Available options

  • to
  • cc
  • bcc
  • from
  • subject
  • headers
  • text
  • html
  • tags
  • metadata
  • recipient_metadata
  • preserve_recipients
  • async