npm.io
1.0.1 • Published 12 years ago

mailover

Licence
MIT
Version
1.0.1
Deps
3
Vulns
15
Weekly
0

Mailover

Simple handy apis for sending mail.

Build Status NPM Version Dependencies Status License Type


TL;DR

Install

$ npm install mailover --save
Simple usage
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);
Semantic usage
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!');

More Options

mailover is based on Nodemailer.
See more options and details here.

License

mailover is licensed under MIT license.
Basically you can do whatever you want to with it.

Keywords