title: node.js email doesn't get sent with gmail smtp
body: <p>I'm trying to send the email gmail smtp but I'm getting the error:</p>
  
  <p>My email and password is correct I'm using the nodemailer for sending the mail;</p>
  
  <pre><code>       var nodemailer = require('nodemailer');
  
                  // create reusable transporter object using SMTP transport 
                  var transporter = nodemailer.createTransport({
                      service: 'Gmail',
                      auth: {
                          admin: 'myuseremail.com',
                          pass: 'password'
                      }
                  });
  
                  var mailOptions = {
                      from: 'sender address', // sender address 
                      to: to, // list of receivers 
                      subject: 'Password Reset', // Subject line 
                      html: 'Your one time password is : &lt;b&gt;' + temporaryPassword + ' &lt;/b&gt;' // html body 
                  };
  
                  transporter.sendMail(mailOptions, function (error, info) {
                      console.log(error,info);
                }
  </code></pre>
  
  <p>in log i'm getting the error:</p>
  
  <pre><code>    {
       [Error: Invalid login]
        code: 'EAUTH',
        response: '535-5.7.8 Username and Password not accepted. Learn more at\n535 5.7.8  https://support.google.com/mail/answer/14257 k5sm20957041pdo.48 - gsmtp',
        responseCode: 535
      } 
  </code></pre>
  
  <p>I try some link but that doesn't work:<br>
       <a href="https://laracasts.com/discuss/channels/general-discussion/help-email-doesnt-get-sent-with-gmail-smtp" rel="noreferrer">https://laracasts.com/discuss/channels/general-discussion/help-email-doesnt-get-sent-with-gmail-smtp</a> </p>