UNPKG

mail-monkey

Version:

[![Build Status](https://travis-ci.org/ElderAS/mail-monkey.svg?branch=master&style=flat-square)](https://travis-ci.org/ElderAS/mail-monkey) [![npm](https://img.shields.io/npm/dt/mail-monkey.svg?style=flat-square)](https://www.npmjs.com/package/mail-monkey

29 lines (26 loc) 582 B
require('dotenv').config() const MailMonkey = require('../src') MailMonkey.config({ handlebars: { configure(hb) { hb.registerPartial('sample', '<h1>Some kind of sample ({{app}})</h1>') }, }, provider: { name: 'Sendgrid', key: process.env.SENDGRID_API_KEY, }, templateDir: __dirname + '/templateDir', mailSettings: { sender: { email: process.env.TEST_FROM, }, }, }) MailMonkey.Demo({ to: process.env.TEST_TO, subject: 'Test', data: {}, }) .then(() => process.exit(1)) .catch(err => console.log(err.response.body.errors))