how to send email in laravel 5 using gmail
<p>I want to send mail using my laravel application but i got some problems it send error saying my smtp server can't be reached .</p>

<p>my mail configation</p>

<pre><code>&lt;?php

return [

    'driver' =&gt; env('MAIL_DRIVER', 'smtp'),

    'host' =&gt; env('MAIL_HOST', 'smtp.gmail.com'),

    'port' =&gt; env('MAIL_PORT', 587),

    'from' =&gt; ['address' =&gt; 'myemail@gmail.com', 'name' =&gt; 'do not replay'],

    'encryption' =&gt; env('MAIL_ENCRYPTION', 'tls'),

    'username' =&gt; env('MAIL_USERNAME'),

    'password' =&gt; env('MAIL_PASSWORD'),

    'sendmail' =&gt; '/usr/sbin/sendmail -bs',


];
</code></pre>

<p>my .env file</p>

<pre><code>APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:XewgRN8avAbSmWxu2IXcB5b3AhwSfdffm9VmpT/0A8k=
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=clear
DB_USERNAME=root
DB_PASSWORD=""

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=myemail@gmail.com
MAIL_PASSWORD=myapppaswword
MAIL_ENCRYPTION=tls 
</code></pre>

<p>but it generate this error</p>

<pre><code>Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 220 but got code "421", with message "421 Cannot connect to SMTP server 74.125.206.108 (74.125.206.108:587), connect error 10060
"
</code></pre>

<p>I searched for solution but i could not find one any help will be appreciated </p>