how to solve this error related to the email password reset

SMTPAuthenticationError at /password_reset/

(535, b’5.7.8 Username and Password not accepted. For more information, go to\n5.7.8 Can't sign in to your Google Account - Gmail Help d9443c01a7336-200bb7e8bf8sm27930335ad.29 - gsmtp’)

heres my code
DEFAULT_AUTO_FIELD = ‘django.db.models.BigAutoField’

EMAIL_BACKEND=‘django.core.mail.backends.smtp.EmailBackend’

EMAIL_HOST=‘smtp.gmail.com

EMAIL_PORT=587

EMAIL_USE_TLS=True

EMAIL_HOST_USER=‘my email address’

EMAIL_HOST_PASSWORD=‘app passwords’

check your EMAIL_HOST_USER and EMAIL_HOST_PASSWORD value.

it seems login auth fail error.

Welcome @Biswas112 !

There are a couple of requirements for an account to be able to use an app password with Gmail:

  • You must have 2-Step verification enabled, and not for use with security keys.
  • You must not have “Advanced Protection” set on.

And, depending upon the type of account, you may not even have this option available any more.

Side note: It’s helpful to become familiar with the sendtestemail when testing email connectivity. It’s a lot simpler than starting your app and visiting a web page.