DEV Community

Discussion on: Django - Reset Password

Collapse
 
dehghan profile image
mehdi

Hi, Thank you for this tutorial. I have the following error for reset password. Would you please help me:

SMTPAuthenticationError at /password-reset/
(535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 support.google.com/mail/?p=BadCred... u6-20020a056870304600b000eba1ab2e02sm4002395oau.18 - gsmtp')

Collapse
 
earthcomfy profile image
Hana Belay

Hi, Thanks for reading.

Check if you have turned on less secure apps on your Google account myaccount.google.com/lesssecureapps

and also make sure you have put the correct credentials in your settings.

Collapse
 
dehghan profile image
mehdi

I have turned on the less secure on my google account, so I'm sure about it. However, I didn't change anything inside the setting. I just want to run your app. Should I change something in the setting part in the following commands?

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = str(os.getenv('EMAIL_USER'))
EMAIL_HOST_PASSWORD = str(os.getenv('EMAIL_PASSWORD'))

Thread Thread
 
earthcomfy profile image
Hana Belay

You have to include your email credentials in your environment variable.