Most common task of a website is to send a email notification to users for different actions. Here we will discuss to setup Gmail for Bagisto so that email functionality should run smoothly.
Previously after enabling less secure app users were able to use email functionality using Gmail But now it is no longer supported.
Now need to ensure that you have enabled 2-step verification should be ON and need to create a App Password.
Steps:
1. Open Settings and click on the Security option:
2. Now, Enable 2 Step Verification:
3. Create an App Password :
4. Now, click on the Select App & choose the Other Option in the drop down:
5. Once your App Password has been generated, this can be used in place of password.
6. Now, you can use this code or password in place of a your actual password in .env file.
1 2 3 4 5 6 7 |
MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=467 MAIL_USERNAME=store@gmail.com MAIL_PASSWORD=<Your_App_Pasword> MAIL_ENCRYPTION=ssl SHOP_MAIL_FROM=store@gmail.com |
Now Emails should work as expected.