I am working on Laravel project and suddenly emails stopped working. After searching I figured out that Google as stopped support for Less Secure Apps and now I no longer see the option to enable or disable it in My Account.
But now I’m not sure how to make it working again as all the results that I search on internet are related to the old method. I want to make it working on localhost.
Here is more detailed link which I found – https://support.google.com/accounts/answer/6010255
Here is Solutions:
We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.
Yes, It’s not working after removing the option by google. But nothing to worry! It’s still very simple to send email. To send email again you need to do this as bellow:
- Login to your gmail
- Go to Security setting and Enable 2 factor authentication
- After enabling this you can see app passwords option. Click here!
- And then, from Your app passwords tab select Other option and put your app name and click GENERATE button to get new app password.
- Finally copy the 16 digit of password and click done. Now use this password instead of email password to send mail via your app.
Now you can use just email and this generated pass to send email.
You need to enable 2 factor authentication in your settings (same place you used to see the less secure apps) then once you enable that you will see a new option called App Passwords – you can then create a app password that you would use for the SMTP settings
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂