-2

I tried to send an email from a Laravel controller, but it's showing this error. I'm not using a two step verified Gmail account. Most tutorials use the "enable less secure app" settings, but I can't enable that option in my account.

enter image description here

this is my env file

MAIL_MAILER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=******
MAIL_PASSWORD=******
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=********
MAIL_FROM_NAME="${APP_NAME}"
Kirk Beard
  • 9,569
  • 12
  • 43
  • 47
nadeesha
  • 25
  • 7
  • 2
    Does this answer your question? [Login credentials not working with Gmail SMTP](https://stackoverflow.com/questions/16512592/login-credentials-not-working-with-gmail-smtp) – Kirk Beard Aug 20 '22 at 05:29
  • Did you follow the steps in [the link included in the error message](https://support.google.com/mail/?p=BadCredentials)? That gives you clear steps to follow to work around this issue. – Kirk Beard Aug 20 '22 at 05:32

1 Answers1

0

Please use your google app password in MAIL_PASSWORD