Ans- When we have to Configure Gmail SMTP Server in Laravel Application
Our .env file looks like this after Configuration:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=ENTER_YOUR_EMAIL_ADDRESS(GMAIL)
MAIL_PASSWORD=ENTER_YOUR_GMAIL_PASSWORD
MAIL_ENCRYPTION=tls
- Since we are using Gmail SMTP, we need to change some security settings on our Google account, to give access to less secured applications and we need to generate App password and mention it to .env file as MAIL_PASSWORD of Laravel app
1.Login to your Google Email Account and click on Google Account Button. This button is display when you click on the profile picture in your Gmail Dashboard as shown.
- Go to your Google Account.
- On the left navigation panel, choose Security.
- On the "Signing in to Google" panel, choose App Passwords. ...
- At the bottom, choose Select app and choose the app you're using.
- Choose Select device and choose the device you're using.
- Choose Generate.
- Follow the instructions to enter the App Password. The App Password is the 16-character code in the yellow bar on your device.
Choose Done.
Most of the time, you’ll only have to enter an App Password once per app or device, so don’t worry about memorizing it.



MotoShare.in is your go-to platform for adventure and exploration. Rent premium bikes for epic journeys or simple scooters for your daily errands—all with the MotoShare.in advantage of affordability and ease.