How to set gmail configration for mail in Laravel?

By Hardik Savani | January 22, 2016 | Category : Laravel

If you are working with laravel and you need to setup gmail configration for send email. if you want to set configration of gmail then first go to mail.php file, you are work on laravel 4 and laravel 5 its not issue, because you can set comman setting for both version of laravel framwork.


'driver' => smtp,

'host' =>,

'port' => 587,

'from' => ['address' => '[email protected]', 'name' => 'Test'],

'encryption' => tls,

'username' => [email protected],

'password' => test123,

'sendmail' => '/usr/sbin/sendmail -bs',

'pretend' => false,

this way you can set your gmail account details and try this but if you still find error then you have problem security. you have open this link :

Then check on Turn On

Try this.......

Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.

We are Recommending you: