if you have decide to use gmail smtp in your Laravel website , here we have describe. how you can archive it easy by follow below steps.
STEP : 01
login to your gmail account and go to “account > Security”
![How to send An Email From Gmail SMTP in Laravel 2 Screenshot at May 08 03 53 12](https://xgenious.com/wp-content/uploads/2021/05/Screenshot-at-May-08-03-53-12.webp)
STEP: 02
Click on app passwords
![How to send An Email From Gmail SMTP in Laravel 3 image](https://xgenious.com/wp-content/uploads/2021/08/image-1024x259.webp)
STEP: 03
google will ask you to confirm by your password. then you will see below screen select app “Mail”
![How to send An Email From Gmail SMTP in Laravel 4 image 1](https://xgenious.com/wp-content/uploads/2021/08/image-1-1024x676.webp)
STEP: 04
now select device, select custom name, and give it a name then click on Generate
![How to send An Email From Gmail SMTP in Laravel 5 image 2](https://xgenious.com/wp-content/uploads/2021/08/image-2.webp)
STEP: 05
now copy marked password, use it instead of your gmail password in step 06
![How to send An Email From Gmail SMTP in Laravel 6 image 3](https://xgenious.com/wp-content/uploads/2021/08/image-3.webp)
STEP 06
now open your .env file and setup below settings
if you are using google workspace then use
smtp-relay.gmail.com as your smtp host
MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=GMAIL_USERNAME
MAIL_PASSWORD=GMAIL_PASSWORD
MAIL_ENCRYPTION=ssl
If you are our cms user, then login to your admin panel go to “General Settings>SMTP Settings” and setup above info from here
that’s all now you can send mail from your Laravel app using Gmail SMTP