Sending emails in Node.js?

NycCompSci picture NycCompSci · Nov 6, 2010 · Viewed 265.1k times · Source

I recently started programming my first node.js. However, I discovered that I am unable to create a contact me form that sends straight to my email since I can't find any modules from node that is able to send emails.

Does anyone know of a node.js email library or an sample contact form script?

Answer

Eric Peterson picture Eric Peterson · Jan 28, 2011

Nodemailer is basically a module that gives you the ability to easily send emails when programming in Node.js. There are some great examples of how to use the Nodemailer module at http://www.nodemailer.com/. The full instructions about how to install and use the basic functionality of Nodemailer is included in this link.

I personally had trouble installing Nodemailer using npm, so I just downloaded the source. There are instructions for both the npm install and downloading the source.

This is a very simple module to use and I would recommend it to anyone wanting to send emails using Node.js. Good luck!