1.2.0 • Published 4 years ago

send-mjml v1.2.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Send MJML

1. Import

const { Sender } = require('send-mjml')
import Sender from 'send-mjml'

2. Create a Sender

const sender = new Sender({
	service: 'gmail',
	email: 'kenmueller0@gmail.com',
	password: '•••••'
})

3. Send your email

// Returns a Promise
sender.sendMjml({
	from: 'kenmueller0@gmail.com', // If unspecified, it chooses either your `defaultFrom` (specified in the `Sender` options), or your `email`
	to: 'notken@gmail.com',
	subject: 'This is a test email',
	path: [__dirname, 'emails/test.mjml'], // Joins the paths
	context: { // Uses https://handlebarsjs.com
		name: 'Ken Mueller',
		title: 'This is a test email'
	}
})
1.2.0

4 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago