1

First of all, I'd just like to clarify that I've looked at all the other questions in regard to this on Stack Overflow and I haven't been able to resolve the issue.

So, the issue I'm having is that I'm not receiving a password reset email on my site, even though everything indicates that the email has been sent. I say this because I get the confirmation on my screen that the email has been sent and I also get the email displayed in the console (see below).

enter image description here

Here are my email settings:

EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
EMAIL_USE_TLS = True
EMAIL_HOST = "localhost"
EMAIL_PORT = 25
EMAIL_HOST_USER = os.environ.get("EMAIL_ADDRESS")
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_PASSWORD")

Here are my password reset URLs:

from django.conf.urls import url
from django.core.urlresolvers import reverse_lazy
from accounts.views import change_password
from django.contrib.auth.views import (
    password_reset,
    password_reset_done,
    password_reset_confirm,
    password_reset_complete)

urlpatterns = [
    url(r'^$', password_reset, name='password_reset'),
    url(r'^reset-password/done/$', password_reset_done,
        name='password_reset_done'),
    url(r'^reset-password/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
        password_reset_confirm, name='password_reset_confirm'),
    url(r'^complete/$', password_reset_complete,
        name='password_reset_complete'),
    url(r'^change-password/$', change_password, name='change_password'),
]

Any feedback is greatly appreciated!

Thanks in advance.

1 Answer 1

2

You specified as EMAIL_BACKEND:

EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"

This is a Console backend [Django-doc], so it does not send an email, but prints the email to the console. This can for example be used for testing purposes.

You can specify as backend for example the SMTP backend [Django-doc]:

EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.