Fingalar / hapi-mailgun

Hapi Plugin for mailgun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hapi-mailgun

Simple Hapi Plugin for Mailgun.

Installation

npm install hapi-mailgun

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:

{ "apiKey": "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
);

About

Hapi Plugin for mailgun

License:MIT License


Languages

Language:JavaScript 100.0%