# how to solve this error related to the email password reset

**URL:** <https://forum.djangoproject.com/t/how-to-solve-this-error-related-to-the-email-password-reset/33765>\
**Category:** Mystery Errors\
**Created:** [August 12, 2024, 2:19am UTC](https://forum.djangoproject.com/t/how-to-solve-this-error-related-to-the-email-password-reset/33765 "2024-08-12T02:19:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Biswas112](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/biswas112/32/23175_2.png) [@Biswas112](https://forum.djangoproject.com/u/Biswas112)\
**Post date:** [August 12, 2024, 2:19am UTC](https://forum.djangoproject.com/t/how-to-solve-this-error-related-to-the-email-password-reset/33765/1 "2024-08-12T02:19:35Z")

</div>

# 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 - Google Account Help](https://support.google.com/mail/?p=BadCredentials) 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](http://smtp.gmail.com)’

EMAIL\_PORT=587

EMAIL\_USE\_TLS=True

EMAIL\_HOST\_USER=‘my email address’

EMAIL\_HOST\_PASSWORD=‘app passwords’

---

<div class="post-metadata">

**Author:** ![white-seolpyo](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/white-seolpyo/32/22386_2.png) [@white-seolpyo](https://forum.djangoproject.com/u/white-seolpyo)\
**Post date:** [August 12, 2024, 4:02am UTC](https://forum.djangoproject.com/t/how-to-solve-this-error-related-to-the-email-password-reset/33765/2 "2024-08-12T04:02:05Z")

</div>

check your EMAIL\_HOST\_USER and EMAIL\_HOST\_PASSWORD value.

it seems login auth fail error.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 12, 2024, 12:03pm UTC](https://forum.djangoproject.com/t/how-to-solve-this-error-related-to-the-email-password-reset/33765/3 "2024-08-12T12:03:25Z")

</div>

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](https://docs.djangoproject.com/en/5.0/ref/django-admin/#sendtestemail) when testing email connectivity. It’s a lot simpler than starting your app and visiting a web page.
