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');
  }
});

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i sendgrid-sender

    Weekly Downloads

    8

    Version

    0.1.1

    License

    ISC

    Last publish

    Collaborators

    • gyula.weber