Simple handy apis for sending mail.
$ npm install mailover --save
var mailover = require('mailover');
// transport mechanism
var transport = {
service: 'gmail',
auth: {
user: 'sender@gmail.com',
pass: 'password'
}
};
// mail message
var mail = {
from: 'sender@address',
to: 'receiver@address',
subject: 'Send a message using mailover',
markdown: {
path: './asset/message.md'
}
};
// send mail
var mailer = mailover(transport);
mailer.send(mail);
var mailroom = require('mailover').mailroom;
// add a mailer to mailroom
var send = mailroom.add('gmail', {
service: 'gmail',
auth: {
user: 'sender@gmail.com',
pass: 'password'
}
});
// send mail
send.mail
.from('sender@address')
.to('receiver@address')
.with.subject('Send a message using mailover')
.and.text('Hello world!');
mailover is based on Nodemailer.
See more options and details here.
mailover is licensed under MIT license.
Basically you can do whatever you want to with it.