How send E-Mail in NODE JS || simplest way to send mail in node

  • Neel Bhardwaj

  • 15-Jan-2022


  • 187

For play with email sytem in NODE JS. Firstly you install the nodemailer module.

STEP 1 :

npm i nodemailer


STEP 2 :

var nodemailer = require('nodemailer');

var transport = nodemailer.createTransport({






     user : '',

     pass : '';



var mailOption = {

   from : '',

   to: '',

   subject:'this is subject',

   text:'This is the text send in mail'






      console.log('Email send',info.response);



"Programming isn't about what you know,
it's about what you can figure out.”
Chris Pine

Neel Bhardwaj

A full stack developer. I have a Passion for Creating Clean, Beautiful, Interactive, Minimalistic, Responsive and User Friendly website, Developed by Modular, Scalable and Functional Code.

Recent comments

Leave a reply

Fatal error: Cannot declare class Connection, because the name is already in use in /home/d8ouyzxnuef4/public_html/ on line 3