UNPKG

@house-agency/brewmail

Version:

The Brewery Mailer Service

40 lines (30 loc) 836 B
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();