h2io-mailer
v0.0.3
Published
Mailer wrapper around nodemailer
Downloads
2
Readme
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: '[email protected]',
to: '[email protected]',
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);
});