I have implemented the reset password functionality using Django. Here I am sending the reset password link to registered email and no mail is coming to the inbox. My code is below.
settings.py:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = '*********'
EMAIL_USE_TLS = False
DEFAULT_FROM_EMAIL = '[email protected]'
registration/password_reset_form.html:
{% extends 'base.html' %}
{% block content %}
<h3>Forgot password</h3>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Submit</button>
</form>
{% endblock %}
registration/password_reset_email.html:
{% autoescape off %}
To initiate the password reset process for your {{ user.get_username }} TestSite Account,
click the link below:
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
If clicking the link above doesn't work, please copy and paste the URL in a new browser
window instead.
Sincerely,
The Nuclear Team
{% endautoescape %}
My password reset form looks like below.
Here I could not send the mail to the given email id.
