Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
nodemailer-sendgridv3-transport
Advanced tools
Sendgrid Web API v3 transport for nodemailer
This module is a transport plugin for Nodemailer that makes it possible to send through SendGrid's v3 Web API using brand new Sendgrid SDK for NodeJS, particularly its mail API.
Contrary to what is stated in de description, currently this library is based on Sendgrid's npm library v2.X.X
Install via npm.
npm install nodemailer-sendgridv3-transport
Require the module and initialize it with your SendGrid credentials.
var nodemailer = require('nodemailer');
var sgTransport = require('nodemailer-sendgridv3-transport');
// api key https://sendgrid.com/docs/Classroom/Send/api_keys.html
var options = {
auth: {
api_key: 'SENDGRID_APIKEY'
}
}
// 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: ['joe@foo.com', 'mike@bar.com'],
from: 'roger@tacos.com',
subject: 'Hi there',
text: 'Awesome sauce',
html: '<b>Awesome sauce</b>'
};
mailer.sendMail(email, function(err, res) {
if (err) console.log(err)
console.log(res);
}
);
README.md
, package.json
, test/main.js
CHANGELOG.md
Version bump vX.X.X
npm publish
vX.X.X
Based on the library nodemailer-sendgrid-transport by SendGrid.
Licensed under the MIT License.
FAQs
SendGrid's Web API v3 transport for Nodemailer
We found that nodemailer-sendgridv3-transport demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.