Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 29, 2024 via pnpm

nodemailer 6.9.7

Easy as cake e-mail sending from your Node.js applications
Package summary
Share
2
issues
2
moderate severity
vulnerability
2
1
license
1
MIT-0
Package created
21 Jan 2011
Version published
22 Oct 2023
Maintainers
1
Total deps
1
Direct deps
0
License
MIT-0

Issues

2

2 moderate severity issues

moderate
Recommendation: Upgrade to version 6.9.9 or later
via: nodemailer@6.9.7
Recommendation: Upgrade to version 6.9.9 or later
via: nodemailer@6.9.7
Collapse
Expand

Licenses

MIT No Attribution

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
nodemailer@6.9.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of nodemailer 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does nodemailer do?

Nodemailer is a popular npm package that allows for simple email sending from your Node.js applications. Essentially, it's your go-to module for programmatically sending emails right from a Node.js server. It's just as easy as baking a cake! πŸ°βœ‰οΈ

How do you use nodemailer?

Using Nodemailer requires initialization and setup of a transport object. This transport object defines the method of sending emails from your Node.js server, usually using an SMTP server. Here's a basic usage example:

const nodemailer = require('nodemailer');

let transporter = nodemailer.createTransport({
    service: 'gmail',
    auth: {
        user: 'example@gmail.com',
        pass: 'password'
    }
});

let mailOptions = {
    from: 'example@gmail.com',
    to: 'receiver@example.com',
    subject: 'Test email',
    text: 'Hello World!'
};

transporter.sendMail(mailOptions, function(err, info){
    if (err) {
        console.log(err);
    } else {
        console.log('Email sent successfully: ' + info.response);
    }
});

In this example, we're using Gmail as the email service. First, we import the Nodemailer module, then create a transporter object with the Gmail service and authentication details. We then define our mail options, which identify the sender, receiver, subject, and the body (text) of the email. Lastly, we use the sendMail method of the transporter object to send the email, providing feedback via the console on whether the email was successfully sent.

Where are the nodemailer docs?

Nodemailer provides extensive documentation and examples to support its usage in a multitude of scenarios. Visit Nodemailer's website for a complete guide, troubleshooting tips, and more on how to optimally integrate it into your Node.js application.