Skip to content

feat: password reset email message #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions allauth_ui/templates/account/password_reset_key_message.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{% load i18n %}{% autoescape off %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.button {
display: inline-block;
padding: 10px 20px;
background-color: #7f22fe;
color: white !important;
text-decoration: none;
border-radius: 5px;
margin: 20px 0;
}
.footer {
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #eee;
font-size: 12px;
color: #666;
}
</style>
</head>
<body>
<h2>{% blocktrans with site_name=current_site.name %}Hello from {{ site_name }}!{% endblocktrans %}</h2>

{% if user.first_name %}
<p>Dear {{ user.first_name }},</p>
{% else %}
<p>Hello,</p>
{% endif %}

<p>{% blocktrans with site_name=current_site.name %}You are receiving this email because a password reset was requested for your {{ site_name }} account. If you did not make this request, please ignore this email.{% endblocktrans %}</p>

<p>{% blocktrans %}To reset your password, please click the button below:{% endblocktrans %}</p>

<a href="{{ password_reset_url }}" class="button">Reset Password</a>

<p>{% blocktrans %}This password reset link will expire in a few hours for security reasons.{% endblocktrans %}</p>

<p>{% blocktrans %}If you have any issues, please contact our support team.</p>

<div class="footer">
{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}
Thank you for using {{ site_name }}!<br>
<a href="https://{{ site_domain }}">{{ site_domain }}</a>
{% endblocktrans %}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it gets the site_domain from the sites framework. It worked when I tried it on the backend repo so believe it should work more generally here.

</div>
</body>
</html>
{% endautoescape %}