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.
'driver' => smtp, 'host' => smtp.gmail.com, 'port' => 587, 'from' => ['address' => 'email@example.com', 'name' => 'Test'], 'encryption' => tls, 'username' => firstname.lastname@example.org, '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
Thanks for read this, I hope it will you. You can also follow us on Facebook.