How to use swig-email-templates - 1 common examples

To help you get started, we’ve selected a few swig-email-templates examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github catamphetamine / webapp / code / mail-service / mailer.js View on Github external
import path from 'path'
import nodemailer from 'nodemailer'
import EmailTemplates from 'swig-email-templates'

const templates = new EmailTemplates
({
	root: path.join(__dirname, 'templates')
})

let transporter

if (configuration.mail_service.smtp)
{
	// create reusable transporter object using the default SMTP transport
	transporter = nodemailer.createTransport
	({
		// pool   : true,
		host   : configuration.mail_service.smtp.host,
		port   : configuration.mail_service.smtp.port,
		secure : configuration.mail_service.smtp.secure, // use SSL
		auth:

swig-email-templates

Node.js module for rendering emails with swig templates and email-friendly inline CSS

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis

Popular swig-email-templates functions

Similar packages