Django: password reset not sending any email

I am trying to implement the 'password-reset' functionality using django. I set up my urls:

    path('account/reset_password/', auth_views.PasswordResetView.as_view(), name='reset_password'),
    path('account/reset_password_sent/', auth_views.PasswordResetDoneView.as_view(), name='password_reset_done'),
    path('account/reset/<uidb64>/<token>', auth_views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
    path('account/reset_password_complete/', auth_views.PasswordResetCompleteView.as_view(), name='password_reset_complete'),

and the Settings.py:

EMAIL_FILE_PATH = f"{BASE_DIR}/sent_emails"
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp-mail.outlook.com'
EMAIL_PORT = '587'
EMAIL_USE_TLS = True
EMAIL_HOST_USER  = 'someaccount@outlook.com'
DEAFULT_FROM_EMAIL = EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = 'somepassword'

No emails are sent from the host email. I tried using console.EmailBackend and an email is indeed written, a working reset link is provided in the email. Everything works besides sending the email to the receiver address. Is there something wrong with the settings?

Back to Top