title: Node mailer Error: connect ECONNREFUSED
body: <p>I've tried all solutions that have been already posted on the site like<br> <br>
  1)Declaring host as smtp.gmail.com <br><br>
  2)secure:false and rejectUnauthorized as unregistered<br> <br>
  3) Allowing less secure apps permission in Gmail<br><br>
  Code snippet looks like this</p>
  
  <pre><code> var nodemailer = require('nodemailer');
  
   var transporter = nodemailer.createTransport({
   service: 'gmail',
   port:'465',
   secure: 'false',
   auth: {
      user: 'my_id',
      pass: 'my_password'
  },
   tls: {
       rejectUnauthorized: false
  }
  });
  
  var mailOptions = {
      from: 'myemail',
      to: receiver's email,
      subject: "some text",
      text: "some text"
  };
  
   transporter.sendMail(mailOptions, function(error, info){
   if (error) {
  console.log(error);
  } else {
  console.log('Email sent: ' + info.response);
  }
    });
  </code></pre>
  
  <p>and i still get the error</p>
  
  <pre><code>{ Error: connect ECONNREFUSED 74.125.124.109:465
  at Object.exports._errnoException (util.js:1026:11)
  at exports._exceptionWithHostPort (util.js:1049:20)
  at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)
  code: 'ECONNECTION',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '74.125.124.109',
  port: 465,
  command: 'CONN' }
  </code></pre>
  
  <p>Any thoughts on how to solve this?</p>