title: Nodemailer and Gmail
body: <p>I'd like to send emails using Nodemailer and GMAIL but it doesn't work...</p>
  
  <p><strong>Edit #1 :</strong></p>
  
  <p>Code :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var transporter = nodemailer.createTransport(smtpPool({
    service: 'gmail',
    auth: {
      user: '***@gmail.com',
      pass: '***'
    },
    maxConnections: 5,
    maxMessages: 10
  }));
  
  var mailOptions = {
    from: mail, // sender address
    to: 'infoprintwithlove@gmail.com',
    subject: subject,
    text: message,
    html: message
  };
  
  transporter.sendMail(mailOptions, function(error, info){
    if(error){
      console.log(error);
    }else{
      request.flash('success', 'Votre message à bien été envoyé.');
      response.redirect('/contacter-printwithlove');
    }
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Error :</strong></p>
  
  <pre><code>{ [Error: Invalid login]
       code: 'EAUTH',
  </code></pre>
  
  <p>It seems that the password is incorrect, but on the Gmail web interface my password works perfectly...</p>
  
  <p><strong>EDIT #2 :</strong></p>
  
  <p><img src="https://i.stack.imgur.com/r3vId.png" alt="enter image description here"></p>