sanmailer
v2.1.0
Published
Nodemailer and email adapter
Downloads
2
Readme
sanmailer
nodemailer and email simple adapter
Settings
$ npm install sanmailer
If you have Sendmail installed you don't need settings
var mailer = require('sanmailer').local();
With host settings:
var mailerConf = {
host: 'some.valid.host.com',
port: 587,
debug: false,
auth: {
user: 'username',
pass: 'password'
}
};
...
var mailer = require('sanmailer').host(mailerConf);
Use
You have two methods
sendMail
mailer.sendMail(
'<[email protected]>',
'[email protected]',
'Subject',
'body',
{
//optative fields
replyTo: ['[email protected]', '[email protected]'],
cc: []
},
function(error, info){
//handle
}
);
checkMail
if(mailer.checkEmail(req.body.sEmail)){
//do stuf
}