The library does not officially support the V2 API, but you can use V2 with an older version of the library. For more information, see Continue Using V2 in Node.js.
// using SendGrid's Node.js Library // https://github.com/sendgrid/sendgrid-nodejs const sendgrid = require("sendgrid")("SENDGRID_APIKEY"); const email = new sendgrid.Email(); email.addTo("email@example.com"); email.setFrom("firstname.lastname@example.org"); email.setSubject("Sending an email with SendGrid is Fun"); email.setHtml("and easy to do anywhere, even with Node.js"); sendgrid.send(email);
Let us know how we’re doing! Please rate this page:
Please note, we cannot resolve account and login issues reported on GitHub. Contact support for account assistance.
Thanks for helping us improve our docs!