title: Why I'm getting Swift_TransportException: Unable to connect with TLS encryption in Server?
body: <p>I have migrated to new server from old server. There are quite changes in new server. Old server was using PHP <code>5.6</code> and phalcon <code>3.2</code> and new server is using PHP <code>7.3</code> &amp; phalcon <code>3.4.4</code>.</p>
  
  <p>In old server email sending is working smoothly but in new server it's throwing the below error:</p>
  
  <blockquote>
    <p>Swift_TransportException: Unable to connect with TLS encryption</p>
  </blockquote>
  
  <p>Server Mail configuration in both sites are:</p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.gmail.com
  MAIL_PORT=587
  MAIL_USERNAME=myemail@gmail.com
  MAIL_PASSWORD=mypassword
  MAIL_ENCRYPTION=tls
  </code></pre>
  
  <p>NOTE: Old site was on <code>http</code> and new site is on <code>https</code></p>