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
}
}
});
The plugin includes a hapi plugin which you can install and use to send out emails by defining a route and an mjml component.
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
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.