sendgrid-template

1.0.1 • Public • Published

sendgrid-template

Shorthand module for sending transactional emails using sendgrid templates.

Usage

var sendmailTemplate = require('sendgrid-template')
sendgridParams = {
  from: 'from@email.com',
  fromname: 'John Doe',
  to: 'to@email.com',
  subject: 'This is a test',
  html: '<h1>Hello World</h1>',
}
sendmailTemplate.send(
  sendgridParams,
  'YOUR_API_KEY',
  'TEMPLATE_ID',
  function(err, json) {
    console.log(json)
  }
)

The parameters are the same as sendgrid

Readme

Keywords

Package Sidebar

Install

npm i sendgrid-template

Weekly Downloads

1

Version

1.0.1

License

WTFPL

Last publish

Collaborators

  • coolacid