Gmail SMTP server stopped working as it no longer support "Less Secure Apps"

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 –

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.

Solution 1

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:

  1. Login to your gmail
  2. Go to Security setting and Enable 2 factor authentication
  3. After enabling this you can see app passwords option. Click here!
  4. And then, from Your app passwords tab select Other option and put your app name and click GENERATE button to get new app password.
  5. 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.

Solution 2

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 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply