Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
nodemailer-sparkpost-transport
Advanced tools
Sign up for a SparkPost account and visit our Developer Hub for more resources.
npm install nodemailer-sparkpost-transport
var nodemailer = require('nodemailer');
var sparkPostTransport = require('nodemailer-sparkpost-transport');
var transporter = nodemailer.createTransport(sparkPostTransport(options));
where:
sparkPostApiKey
- SparkPost API Key. If not provided, it will use the SPARKPOST_API_KEY
env var.endpoint
- The endpoint to use for the SparkPost API requests. If you have a SparkPost EU account, set this to https://api.eu.sparkpost.com
(optional)campaign_id
- Name of the campaign (optional)metadata
- Transmission level metadata containing key/value pairs (optional)options
- JSON object in which transmission options are defined (optional)substitution_data
- Key/value pairs that are provided to the substitution engine (optional)For more information, see the SparkPost API Documentation for Transmissions
transport.sendMail({
from: 'me@here.com',
to: 'you@there.com',
subject: 'Very important stuff',
text: 'Plain text',
html: 'Rich taggery'
}, function(err, info) {
if (err) {
console.log('Error: ' + err);
} else {
console.log('Success: ' + info);
}
});
Read more about Nodemailer's sendMail()
method here.
The SparkPost Nodemailer transport also supports a few SparkPost-specific sendMail()
options in both the transport constructor and the 'sendMail()` method.
Note: sendMail()
options override their constructor counterparts:
campaign_id
- Overrides for constructor optionmetadata
- Override for constructor optionoptions
- Override for constructor optionsubstitution_data
- Override for constructor option[2.2.0] - 2018/11/9
FAQs
SparkPost transport for Nodemailer
The npm package nodemailer-sparkpost-transport receives a total of 1,156 weekly downloads. As such, nodemailer-sparkpost-transport popularity was classified as popular.
We found that nodemailer-sparkpost-transport demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.