tidalgo22
2/19/2018 - 12:48 AM

Laravel with SMTP Gmail Setup

Laravel with SMTP Gmail Setup

.env

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=user@gmail.com
MAIL_PASSWORD= App password for 2-step verification
MAIL_ENCRYPTION=tls

MAIL_FROM_ADDRESS=user@gmail.com
MAIL_FROM_NAME=John Doe

enable the 2-step verification to google https://www.google.com/landing/2step/
Create App Password to be use by your system https://accounts.google.com/ServiceLogin?service=accountsettings&passive=1209600&osid=1&continue=https://myaccount.google.com/apppasswords&followup=https://myaccount.google.com/apppasswords&rart=ANgoxcdIkp402LNsTNp9iWd88aWql7DSS7Bg9h7gerdw-Co_wjj_cd6J1NYSIrJKddbjNsrJYWaFqqpnrS7RvDGSkc5iX4d-lg&authuser=0
I selected Others (custom name) and clicked generate

then do: 
php artisan config:clear
php artisan config:cache