sendgrid-liquid-mailer
v1.1.0
Published
A quick way to send an email (via Sendgrid) rendered from a Liquid template.
Downloads
8
Readme
Sendgrid Liquid Mailer
A quick way to send an email (via Sendgrid) rendered from a Liquid template.
Usage
const SendgridLiquidMailer = require('sendgrid-liquid-mailer');
const mailer = new SendgridLiquidMailer(SENDGRID_API_KEY);
const email = {
bodyTemplate: `Hello, {{name}}`,
data: {name: 'world'},
fromAddress: '[email protected]',
fromName: 'Example Sender',
toAddress: '[email protected]',
bccAddress: '[email protected]',
toName: 'A Recipient',
subjectTemplate: 'You are a winner.'
};
const result = mailer.sendLiquidEmail(email);