Django: reset-password not sending email Django: reset-password not sending email django django

Django: reset-password not sending email


As your sending test in Django shell works it means that your email settings are well configured.

If you still not getting the email from the password_reset you have to search your problem in this field.

You have to know that the password reset email is sent only to active users (is_active), and only if they have an usable password (has_usable_password).

If an user has an invalid password, Django will just silently not send the reset email.

Use the following code in the Django shell to test all your users:

from django.contrib.auth import get_user_model[(u.email, u.is_active, u.has_usable_password()) for u in get_user_model().objects.all()]


Try if the mail is sent or not:./manage.py shell

from django.core.mail import send_mailsend_mail('Subject here', 'Here is the message.', 'from@example.com',['to@example.com'], fail_silently=False)

if the return is 0, then you have to reconfigure your email settings. Make sure you input the right credential. Check the documentation https://docs.djangoproject.com/en/dev/topics/email/#send-mail