@house-agency/brewmail

0.2.7 • Public • Published

The Brewery Mailer

Usage

Setup the config

{
    "mail": {
        "transport": {
            "host": "smtp.host.tld",
            "port": 443
        },
        "templates": {
            "generic-mail": "templates/generig-mail.pug"
        }
    }
}

Write your mail template

subject Some nice subject with #{somevalue}
body And then your body with #{someothervalue}

Run the code

::javascript
const conf = require('@house-agency/brewtils/config').load('config.json');
const mail = require('brewmail');

// Add a mail to the queue
mail.add('dude@thebrewery.se', 'generic-mail', {
    somevalue: 'an hello',
    someothervalue: 'a long message'
});

// Send all enqueued mail
mail.send_all_enqueued();

Readme

Keywords

Package Sidebar

Install

npm i @house-agency/brewmail

Weekly Downloads

0

Version

0.2.7

License

MIT

Last publish

Collaborators

  • lisandro.mindel
  • magnuswiden
  • martvdmoosdijk
  • botteu