Node js

how to send an email to nodejs from Gmail

Pinterest LinkedIn Tumblr
        var nodemailer = require('nodemailer');
         var send = require('gmail-send');
         var mailserverifo = nodemailer.createTransport({
         service: 'gmail',
         host : "",
         port : "465",
         ssl : true,
         auth: {
         user: '[email protected]',
         pass: '[email protected]'
          var Mailinfo = {
          from: '[email protected]',
          to: '[email protected]',
          subject: 'Testing email from node js server',
          text: 'That was easy!'

        mailserverifo.sendMail(Mailinfo, function(error, info){
        if (error) {
        } else {
         console.log('Email Send Success: ' + info.response);
       Enable less secure app form setting -

Allow access for “Display Unlock captcha option” (Allow access to your Google account). Here is the link :
Here is the link :

Write A Comment