www.nodemailer.com Open in urlscan Pro
65.109.90.220  Public Scan

Submitted URL: http://www.nodemailer.com/
Effective URL: https://www.nodemailer.com/
Submission: On September 08 via api from OM — Scanned from FI

Form analysis 1 forms found in the DOM

POST https://www.paypal.com/cgi-bin/webscr

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
  <input type="hidden" name="cmd" value="_s-xclick">
  <input type="hidden" name="hosted_button_id" value="DB26KWR2BQX5W">
  <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" style="display: inline">
  <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Text Content

Powered by EmailEngine

Send and receive emails easily with Outlook and Gmail using OAuth2.
 * 1. Nodemailer
   * Migration
   * License
 * 2. Usage
   * SMTP? Say what?
   * Using Gmail
   * Delivering bulk mail
 * 3. Message configuration
   * Attachments
   * Alternatives
   * Address object
   * Calendar events
   * Embedded images
   * List headers
   * Custom headers
   * Custom source
 * 4. SMTP transport
   * SMTP envelope
   * Pooled SMTP
   * Testing SMTP
   * OAuth2
   * Custom authentication
   * Proxy support
   * Delivery status notifications
 * 5. Other transports
   * Sendmail transport
   * SES transport
   * Stream transport
 * 6. Plugins
   * Create plugins
 * 7. DKIM
 * 8. Extra modules
   * SMTP Server
   * SMTP Connection
   * Mailparser
   * Mailcomposer
   * Node.js daemons
 * 9. NodemailerApp




navigation


NODEMAILER

Nodemailer is a module for Node.js applications that allows easy email sending.
The project started in 2010 when there were few reliable options for sending
email messages, and today, it is the default solution for most Node.js users.

npm install nodemailer


Check out EmailEngine – a self-hosted email gateway that allows you to make REST
requests to IMAP and SMTP servers. EmailEngine also sends webhooks whenever
something changes on the registered accounts.

Using the email accounts registered with EmailEngine, you can receive and send
emails. It supports OAuth2, delayed sends, opens and clicks tracking, bounce
detection, and more, all without needing an external MTA service.


NODEMAILER FEATURES

 * A single module with zero dependencies – easy to audit the code with no
   hidden complexities
 * Emphasis on security – avoid RCE vulnerabilities
 * Unicode support to use any characters, including emoji 💪
 * Windows support – install with npm on Windows without any compiled
   dependencies. Perfect for use with Azure or on your local Windows machine
 * Send HTML content with plain text alternatives
 * Attach Attachments to emails
 * Embed Images in HTML emails so your design doesn’t get blocked
 * Secure email delivery with TLS/STARTTLS
 * Various transport methods beyond the default SMTP support
 * Sign emails with DKIM
 * Custom Plugin support for advanced message manipulation
 * Supports OAuth2 authentication
 * Proxies for SMTP connections
 * ES6 codebase – fewer chances of memory leaks from hoisted var’s
 * Autogenerated test email accounts from Ethereal.email

REQUIREMENTS

 * Node.js v6.0.0 or newer. That’s all you need.

If you’re running Node.js version 6 or later, you can use Nodemailer. There are
no specific platform or resource requirements. All Nodemailer methods support
both callbacks and Promises (if no callback is provided). If you want to use
async..await, you’ll need Node.js v8.0.0 or newer.

TL;DR

To send an email, follow these steps:

 1. Create a Nodemailer transporter using either SMTP or another transport
    method
 2. Set up your message options (who sends what to whom)
 3. Deliver the message using the sendMail() method of your transporter

EXAMPLE

Below is an example to send an email with both plain text and HTML content using
Ethereal Email.

const nodemailer = require("nodemailer");

const transporter = nodemailer.createTransport({
  host: "smtp.ethereal.email",
  port: 587,
  secure: false, // true for port 465, false for other ports
  auth: {
    user: "maddison53@ethereal.email",
    pass: "jn7jnAPss4f63QBp6D",
  },
});

// async..await is not allowed in global scope, must use a wrapper
async function main() {
  // send mail with defined transport object
  const info = await transporter.sendMail({
    from: '"Maddison Foo Koch 👻" <maddison53@ethereal.email>', // sender address
    to: "bar@example.com, baz@example.com", // list of receivers
    subject: "Hello ✔", // Subject line
    text: "Hello world?", // plain text body
    html: "<b>Hello world?</b>", // html body
  });

  console.log("Message sent: %s", info.messageId);
  // Message sent: <d786aa62-4e0a-070a-47ed-0b0666549519@ethereal.email>
}

main().catch(console.error);



EXAMPLES

 * Nodemailer AMQP example: Learn how to use RabbitMQ with Nodemailer for email
   message management. Source.

Output from the example script viewed through the Ethereal mail catching
service:




SOURCE

Find the Nodemailer source code on GitHub.

--------------------------------------------------------------------------------

Nodemailer was created by Andris Reinman, and the Nodemailer logo was designed
by Sven Kristjansen.