knode-mailer
v1.0.2
Published
nodemailer wrapper
Downloads
6
Readme
knode-mailer
is a simple node module wrapper on nodemailer.
Install:
npm install --save knode-mailerUsage:
Config sample
mailer:
service: 'SES-EU-WEST-1'
from: 'sender <[email protected]>'
auth:
user: process.env.MAILER_USER
pass: process.env.MAILER_PASSJS sample
var mailer = require('knode-mailer')(config); //config should hold all the settings as shown above
var htmlContent = false;
var attachments = [{filename: 'image.jpg',path: '/path/to/image.jpg'}];
mailer.send('[email protected]', 'subject', 'message body', htmlContent, attachments, function(err, info) {
if (err) {
console.log("ERROR: " + err);
}
return console.log(info);
});