nodemailer-sendgrid-transport / 0.2.0 last updated a year ago created on Jul 15th 2014


npm install --save nodemailer-sendgrid-transport


git clone

dependencies show all 75

main sendgrid 1.9.2 MIT

maintainers +3 more

eddiezane eddiezane
scottmotte scottmotte
elbuo8 elbuo8
motdotla motdotla
nquinlan nquinlan
mkbernier mkbernier
thinkingserious thinkingserious


0.2.0 a year ago eddiezane
0.1.0 2 years ago eddiezane
0.0.2 2 years ago eddiezane
0.0.1 2 years ago eddiezane
563 Downloads yesterday.



This module is a transport plugin for Nodemailer that makes it possible to send through SendGrid's Web API!

BuildStatus NPM version


Install via npm.

npm install nodemailer-sendgrid-transport

Require the module and initialize it with your SendGrid credentials.

var nodemailer = require('nodemailer');
var sgTransport = require('nodemailer-sendgrid-transport');

// api key
var options = {
    auth: {
        api_key: 'SENDGRID_PASSWORD'

// or

// username + password
var options = {
    auth: {
        api_user: 'SENDGRID_USERNAME',
        api_key: 'SENDGRID_PASSWORD'

var mailer = nodemailer.createTransport(sgTransport(options));

Note: We suggest storing your SendGrid username and password as enviroment variables.

Create an email and send it off!

var email = {
    to: ['', ''],
    from: '',
    subject: 'Hi there',
    text: 'Awesome sauce',
    html: '<b>Awesome sauce</b>'

mailer.sendMail(email, function(err, res) {
    if (err) { 


Licensed under the MIT License.

Resolving all dependencies.. This could take a while as our cache is not yet fully warmed up.