1) Login to your gmail account. Click on "Manage your Google Account".
2) Click on security.
3) Enable 2 step verification
click on get started
Enter password and click next
Now the 2 step verification is on.
3) Go to App passwords
Select mail and your device
Copy the app password and paste in your .env file.
That's it and you are ready to go.