title: Send Laravel 5.5 mail using gmail
body: <p>I have been getting an error while i try to send an email using laravel 5.5 with gmail. </p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=gmail-smtp-msa.l.google.com
  MAIL_PORT=587
  MAIL_USERNAME=mygmailadress
  MAIL_PASSWORD=mypassword
  MAIL_ENCRYPTION=tls
  </code></pre>
  
  <p>I changed the mail host from smtp.google.com to that one becuase i could not reach smtp.google.com</p>
  
  <p>Here is the error i get when i try to send mail</p>
  
  <pre><code>stream_socket_enable_crypto(): Peer certificate CN=`smtp.gmail.com' did not match expected CN=`gmail-smtp-msa.l.google.com'
  </code></pre>
  
  <p>And this is the error that i use when i use mail_host smtp.google.com</p>
  
  <pre><code>Connection could not be established with host smtp.google.com 
  [php_network_getaddresses: getaddrinfo failed: Name or service not known #0
  </code></pre>
  
  <p>Note that everything was working well with my testing server mailtrap. So how can i make this work for production?</p>