@spacefill/gibbon-mail

0.5.0 • Public • Published

Gibbon-mail - Backend

Send mails with mjml Template and JSON Schema.

To generate PDF instead send mails, see this project: gibbon-pdf

Quick start

You can use gibbon-mail as a standalone app:

$ npm install -g @spacefill/gibbon-mail
$ gibbon-mail

or as library:

const { createApp } = require('@spacefill/gibbon-mail')

const app = createApp()

const server = app.listen(
  5000,
  '0.0.0.0',
  () => {
    console.log(`Server listening on port: 5000`);
  }
);

Configuration

gibbon-mail must be setup to be used, you can find configuration in ./src/config.js.

Hack

Install dependencies first:

$ yarn install

You can start mailhog:

$ docker-compose up -d
$ yarn run test

Access to mailhog1: http://127.0.0.1:8025/ Access to mailhog2: http://127.0.0.1:8026/

$ direnv allow
$ yarn run watch

Access to Swagger docs: http://127.0.0.1:5000/docs/

If you want to try second smtp server, uncomment these lines

$ direnv allow

/@spacefill/gibbon-mail/

    Package Sidebar

    Install

    npm i @spacefill/gibbon-mail

    Weekly Downloads

    3

    Version

    0.5.0

    License

    ISC

    Unpacked Size

    6.1 MB

    Total Files

    22

    Last publish

    Collaborators

    • paulspacefill
    • alexandre-spacefill
    • emartinet-spacefill