0.0.3 • Published 8 years ago

h2io-mailer v0.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

H2io - Mailer

Installation

npm install h2io-mailer

Usage

import { factoryMailgun } from 'h2io-mailer';

const opts = {
  user: 'your_mailgun_username',
  pass: 'your_mailgun_password',
};
const mailgun = factoryMailgun(opts);

const sendOpts = {
  from: 'from.email@example.com',
  to: 'to.email@example.com',
  subject: 'Your subject',
  text: 'Your text body',
  html: 'Your <strong>html</strong> body',
};
mailgun.send(sendOpts, (err, info) => {
  if (error) {
    return console.log(error);
  }
  console.log('Message sent:', info.response);
});
0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago