Nodemailer is a module for Node.js applications to allow easy as cake email sending. The project got started back in 2010 when there was no sane option to send email messages, today it is the solution most Node.js users turn to by default.
Trying to debug emails?
New! Try out the all new ultimate email debugging app by Nodemailer.
If you really like Nodemailer or your business benefits from it financially then I would really appreciate a small donation. You can either use Bitcoin or PayPal for donations.
- A single module with zero dependencies – code is easily auditable, as there are no dark corners
- Heavy focus on security, no-one likes RCE vulnerabilities
- Unicode support to use any characters, including emoji 💪
- Windows support – you can install it with npm on Windows just like any other module, there are no compiled dependencies. Use it hassle free from Azure or from your Windows box
- Use HTML content, as well as plain text alternative
- Add Attachments to messages
- Embedded image attachments for HTML content – your design does not get blocked
- Secure email delivery using TLS/STARTTLS
- Different transport methods in addition to the built-in SMTP support
- Sign messages with DKIM
- Custom Plugin support for manipulating messages
- Sane OAuth2 authentication
- Proxies for SMTP connections
- ES6 code – no more unintentional memory leaks, due to hoisted var’s
- Autogenerated email test accounts from Ethereal.email
- Node.js v6.0.0 or newer. That’s it.
If you are able to run Node.js version 6 or newer, then you can use Nodemailer. There are no platform or resource specific requirements. All public Nodemailer methods support both callbacks and Promises (if callback is omitted). You need to have at least Node v8.0.0 if you want to use async..await with Nodemailer.
In short, what you need to do to send messages, would be the following:
- Create a Nodemailer transporter using either SMTP or some other transport mechanism
- Set up message options (who sends what to whom)
- Deliver the message object using the sendMail() method of your previously created transporter
This is a complete example to send an email with plain text and HTML body
- Nodemailer AMQP example is an example of using RabbitMQ to manage Nodemailer email messages. Source.
Output of the the example script as shown by the Ethereal mail catching service:
Nodemailer source can be found from Github.
Nodemailer is created by Andris Reinman. The Nodemailer logo was designed by Sven Kristjansen.
- Do hedge funds still employ prop traders
- Why are human resources so hated
- What are some best Collaboration platforms
- Which art forms are you engaged in
- Who are MS13
- What is the gmstrftime function in PHP
- What is the prefix for fortune
- What are your reincarnation stories
- Can you stunt growth
- What are the customs of Chileans
- What happens when we mix chemicals
- How do you tackle a feminazi
- Is a martingale both supermartingale and submartingale
- What causes high levels of dissolved oxygen
- What is a manipulator 1
- What religious event occurs after Easter
- Is saline soil acidic