title: NodeMailer Invalid Login
body: <p>I am new to node.js programming .I am using nodemailer module for sending emails.<br></p>
  
  <pre><code>const nodemailer = require ('nodemailer'),
  credentials=require('./credentials.js');
  var mailTransport=nodemailer.createTransport({
      service:'Gmail',
      auth: {
          user : credentials.gmail.user,
          pass : credentials.gmail.password,
      }
  });
  function sendMail(mail_id){
      mailTransport.sendMail({
          from: ' "my name" &lt;myname@gmail.com&gt;',
          to : mail_id,   //user@gmail.com
          subject : 'Hello',
          text: "Hello How do u do ?",
      },function(err,info){
          if(err){
              console.log('Unable to send the mail :'+err.message);
          }
          else{
              console.log('Message response : '+info.response);
          }
      });
  }
  exports.sendMail=sendMail;
  </code></pre>
  
  <p>This is my program for sending emails to different users. But I am getting <b>Invalid Login</b> . I don't have any idea why this is coming . I am new to node.js and server side scripting. <br>
  I am using my gmail username and password for credentials.<br>
  Please help me.</p>