title: Sending email using nodemailer got stuck on Ubuntu 16.04
body: <p>So we use package nodemailer for sending emails using Node.js API. It works fine localy on Windows, using <code>smtp.gmail.com</code>. Once we move node API to <strong>Ubuntu 16.04</strong>, sending emails <strong>stop working</strong>. The rest of the API works fine.
  On our gmail account, we enabled both:</p>
  
  <ol>
  <li><a href="https://accounts.google.com/b/0/DisplayUnlockCaptcha" rel="nofollow noreferrer">https://accounts.google.com/b/0/DisplayUnlockCaptcha</a> and</li>
  <li><a href="https://myaccount.google.com/lesssecureapps" rel="nofollow noreferrer">https://myaccount.google.com/lesssecureapps</a></li>
  </ol>
  
  <p>Code:</p>
  
  <pre><code>var transporter = nodemailer.createTransport({ 
      //tried other combinations aswell
      service: 'gmail', 
      host: 'smtp.gmail.com', 
      //tried port 465 and secure:true
      port: 587, 
      secure: false, 
      auth: { 
          user: 'sender@gmail.com', 
          pass: 'password' 
      } 
  });
  
  
  var mailOptions = {
      from: 'sender@gmail.com',
      to: 'reciever@gmail.com',
      subject: 'Welcome',
      html: "Hello": 
  };`
  </code></pre>
  
  <p>We tried other mail providers, such as outlook, zoho, yandex,...The timeout happens everytime. Firewall on Ubuntu is disabled, also the installation is fresh.</p>
  
  <p><strong>SOLUTION</strong></p>
  
  <p>The problem was on service provider, where Ubuntu was hosted.</p>