We recommend using SendGrid Node.js, our client library, available on Github, with full documentation.

using SendGrid’s Node.js Library

1
2
3
4
5
6
7
8
9
10
// using SendGrid's Node.js Library - https://github.com/sendgrid/sendgrid-nodejs
var sendgrid = require("sendgrid")(api_user, api_key);
var email = new sendgrid.Email();

email.addTo("test@sendgrid.com");
email.setFrom("you@youremail.com");
email.setSubject("Sending with SendGrid is Fun");
email.setHtml("and easy to do anywhere, even with Node.js");

sendgrid.send(email);