0.2.7 • Published 8 years ago

@house-agency/brewmail v0.2.7

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
8 years ago

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();
0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago