Skip to content

neilzh/mailover

Repository files navigation

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.

About

Simple handy apis for sending mail

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published