hapi-email-plugin

0.0.1 • Public • Published

Hapi Email plugin

wercker status

This is a Hapi.js plugin to provide configuration and access to nodemailer.

Current maintainer: Marios Antonoudiou

Installation

$ # provide example

Configuration

server.register({
	register: require('hapi-email-plugin'),
	options: {
		transporter: nodemailerStub()
	}
}, err => {
	done(err);
});

Usage

It currently provides a server method, that can send emails. Keep in mind that the email options are passed to nodemailer created transporter.

const emailOptions = {
	from: 'marios@thechatshop.com',
	to: 'info@thechatshop.com',
	subject: 'Test email',
	text: 'Lorem ipsum dorcet sit amet',
	html: '<p>Lorem ipsum dorcet sit amet</p>'
};

server.methods.sendEmail(emailOptions, (err, response) => {
	// Do something
});

Readme

Keywords

none

Package Sidebar

Install

npm i hapi-email-plugin

Weekly Downloads

5

Version

0.0.1

License

ISC

Last publish

Collaborators

  • mariosant