When using the built-in authentication views and forms how do you set the email from_addr field?
I’m using the built-in authentication views:
path("accounts/", include("django.contrib.auth.urls")),
I’ve created a password_reset.html
{% block content %}
<form action="" method="post">
{% csrf_token %}
{% if form.email.errors %}
{{ form.email.errors }}
{% endif %}
<p>{{ form.email }}</p>
<input type="submit" class="btn btn-primary" value="Reset password">
</form>
{% endblock %}
and a password_reset_email.html
Someone asked for password reset for email {{ email }}. Follow the link below:
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
My email server requires a valid from address, currently from_addr = ‘webmaster@localhost’
Is it possible to set this value whilst still using the built-in views and forms?
Many thanks