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?
Complete Code to send Email Using nodemailer Module
Nodemailer Module is the simplest way to send emails in node.js.
Try this sample example form: http://www.tutorialindustry.com/nodejs-mail-tutorial-using-nodemailer-module
Additional Info: http://www.nodemailer.com/
campaign is a comprehensive solution for sending emails in Node, and it comes with a very simple API.
You instance it like this.
To send emails, you can use Mandrill, which is free and awesome. Just set your API key, like this:
(if you want to send emails using another provider, check the docs)
Then, when you want to send an email, you can do it like this:
The GitHub repo has pretty extensive documentation.
npm has a few packages, but none have reached 1.0 yet. Best picks from
npm list mail
:You definitely want to use https://github.com/niftylettuce/node-email-templates since it supports nodemailer/postmarkapp and has beautiful async email template support built-in.
node-email-templates is a much better option: https://github.com/niftylettuce/node-email-templates
it has support for windows as well