Simple Hapi Plugin for Mailgun.
npm install hapi-mailgun
This plugin is based on mailgun-js and is just a simple wrapper plugin for sending raw text and HTML emails.
Please see Mailgun Documentation for full Mailgun API reference.
The mailgun configuration should be passed at the plugin registration as option parameters with the following format:
{ "apiKey": "key-XXXXXXXXXXXXXXXXXXXXXXX", "domain": "mydomain.mailgun.org" }
server.plugins['hapi-mailgun'].sendHTMLEmail(
'John Doe <john@doe.com>', // from
'john@doe.com', // to
'Hello', // subject
'Test email text', // body
'<b>Test email text</b>' // HTML content
);