nodemailer-browser
v0.1.0
Published
Plugin for nodemailer which open mail in the browser once sent
Downloads
165
Readme
NodeMailer Browser
Open email in the browser when invoking nodemailer#sendMail.
Applies for Nodemailer v1.x and not for v0.x. For v0.x use version nodemailer-browser 0.0.3 instead.
Usage
Once installed from npm (nodemailer-browser module):
var nodemailer = require('nodemailer');
var nodemailerBrowser = require('nodemailer-browser');
var path = require('path');
var tmpdir = path.join(__dirname, 'tmp', 'mailerbrowser');
var transport = nodemailer.createTransport(nodemailerBrowser({
dir: tmpdir,
browser: true
}));
var mail = {
html: '<h1>Test</h1>'
};
transport.sendMail(email, function(err, info) {
console.log('Mail saved to:', info.messageId);
});
License
Others
This was coded with <3 by Linagora. Use, share, fork, send pull requests !