14

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

Akhilesh
  • 927
  • 1
  • 6
  • 21

2 Answers2

39

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.

1

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

Yeak
  • 2,470
  • 9
  • 45
  • 71
  • I've added the App Password for http://127.0.0.1:8000 but still getting the same error in laravel. Couldn't authenticate. – Akhilesh Jun 11 '22 at 04:42
  • What’s the error your getting?honestly haven’t tried on local host but I have Laravel app on prod that worked this way – Yeak Jun 11 '22 at 23:31
  • Tried to do the same thing. But same error. My setup was under app is mail. And device is custom. Looking for solution too. – Undecided Dev Jun 15 '22 at 04:47