Skip to content

An email server that serves email templates using mjml

License

Notifications You must be signed in to change notification settings

joshferrell/hapi-maily

Repository files navigation

Hapi Maily Hapi Maily

Join the chat at https://gitter.im/hapi-smiles/hapi-maily Build Status Coverage Status

Project Status

An email service that generates html email templates using mjml, then sends the emails to the requested user.

Create and send mail templates for your Hapi server easily simply by creating an mjml template in React, and defining a route like so:

    const SimpleEmail = () => (
        <mj-text>
            <p>This is pretty easy!</p>
        </mj-text>
    );

    server.route({
        method: 'POST',
        path: '/',
        handler: {
            email: {
                subject: 'test',
                component: SimpleEmail
            }
        }
    });

Hapi Plugin

The plugin includes a hapi plugin which you can install and use to send out emails by defining a route and an mjml component.

Read More

Email Component Library

The project includes a component library that allows users to create widgets in React and then preview them in Storybook easily. You can view current components available to install through yarn add hapi-maily-widgets online through storybook

Read More

Sample Server Project

The sample server allows the creation of email templates that can be viewed through storybook for auditing. It also allows restricts the information allowed to be injected into the email templates since most of the data is static. This is to allow companies to better audit outbound emails to users through one Micro-Service.

Read More