Skip to content

Instantly share code, notes, and snippets.

@jondcallahan
jondcallahan / mandrill-send.js
Created February 4, 2016 22:24
Send an html email from the command line via Mandrill. Useful for rapidly testing html emails.
var email = require('mandrill-send')('MANDRILL_API_KEY');
var fs = require('fs');
require.extensions['.html'] = function (module, filename) {
module.exports = fs.readFileSync(filename, 'utf8');
};
var htmlEmail = require("PATH_TO_FILE.HTML");
email({