sendgrid-sender

0.1.1 • Public • Published

npm-sendgrid-sender

Send am email via sendgrid in the most simple way

Parameters

  • from: source address
  • to: destination address
  • subject: subject
  • html: html message

Example

var sender = require('sendgrid-sender');
sender(SENDGRID_API_KEY, {
  from: 'example@example.com',
  to: 'example@example.com',
  subject: 'test message',
  html: '<h1> Hello </h1>'
}, function(err) {
  if (err) {
    console.log('error while sending message: ' + err);
  } else {
    console.log('message sent');
  }
});

Readme

Keywords

Package Sidebar

Install

npm i sendgrid-sender

Weekly Downloads

0

Version

0.1.1

License

ISC

Last publish

Collaborators

  • gyula.weber