0.0.1 • Published 8 years ago

hapi-mailgun v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

hapi-mailgun

Simple Hapi Plugin for Mailgun.

Installation

Usage overview

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:

{ "api_key": "key-XXXXXXXXXXXXXXXXXXXXXXX", "domain": "mydomain.mailgun.org" }

Example usage

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
);
0.0.1

8 years ago