Home Laravel How to set gmail configuration for mail in Laravel?

How to set gmail configuration for mail in Laravel?

by Shahriar Sagor
gmail configuration for mail in Laravel

Today now in this tutorial i will show you how to set gmail configuration for mail in laravel application. If we are working on laravel and some time we need to setup gmail configuration for send email. So if we want to set configuration of gmail then at first go to mail.php file, we are work on laravel any version its not issue, because we can set it common setting for both version of laravel framework. Here we will know how to configuration mail in Laravel.

Mail.php
'driver' => smtp,
    'host' => smtp.gmail.com,
    'port' => 587,
    'from' => ['address' => 'test@gmail.com', 'name' => 'Test'],
    'encryption' => tls,
    'username' => test@gmail.com,
    'password' => test123,
    'sendmail' => '/usr/sbin/sendmail -bs',
    'pretend' => false,

So on this way we can set our gmail account details and it can try this but if we still find error then we have problem security. So we have open this link : https://www.google.com/settings/security/lesssecureapps

Then check on Turn On

Read Also : How to count number of files in folder and remove all files in folder in laravel example?

Thanks for read this, I hope it will you. You can also follow us on Facebook.

close

You may also like