mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 00:22:03 +00:00
new email template
This commit is contained in:
parent
072364497c
commit
47da932a2b
@ -1,77 +1,31 @@
|
|||||||
<table cellpadding="0" cellspacing="0" align="center" style="text-align:left;font-family:'微软雅黑','黑体',arial;"
|
<div>
|
||||||
width="742">
|
<table cellpadding="0" align="center"
|
||||||
<tbody>
|
style="overflow:hidden;background:#fff;margin:0 auto;text-align:left;position:relative;font-size:14px; font-family:'lucida Grande',Verdana;line-height:1.5;box-shadow:0 0 3px #ccc;border:1px solid #ccc;border-radius:5px;border-collapse:collapse;">
|
||||||
<tr>
|
<tbody>
|
||||||
<td>
|
<tr>
|
||||||
<table cellpadding="0" cellspacing="0"
|
<th valign="middle"
|
||||||
style="text-align:left;border:1px solid #50a5e6;color:#fff;font-size:18px;" width="740">
|
style="height:38px;color:#fff; font-size:14px;line-height:38px; font-weight:bold;text-align:left;padding:10px 24px 6px; border-bottom:1px solid #467ec3;background:#518bcb;border-radius:5px 5px 0 0;">
|
||||||
<tbody>
|
{{ website_name }}</th>
|
||||||
<tr height="39" style="background-color:#50a5e6;">
|
</tr>
|
||||||
<td style="padding-left:15px;font-family:'微软雅黑','黑体',arial;">
|
<tr>
|
||||||
{{ website_name }}
|
<td>
|
||||||
</td>
|
<div style="padding:20px 35px 40px;">
|
||||||
</tr>
|
<h2 style="font-weight:bold;margin-bottom:5px;font-size:14px;">Hello, {{ username }}:</h2>
|
||||||
</tbody>
|
<p style="margin-top:20px">
|
||||||
</table>
|
Please click <a href="{{ link }}">{{ link }}</a> to reset your password in 20 minutes.
|
||||||
<table cellpadding="0" cellspacing="0"
|
</p>
|
||||||
style="text-align:left;border:1px solid #f0f0f0;border-top:none;color:#585858;background-color:#fafafa;"
|
<p style="margin-top:20px">
|
||||||
width="740">
|
To protect your account, please do not use simple passwords.
|
||||||
<tbody>
|
</p>
|
||||||
<tr height="25">
|
<p style="margin-top:20px">
|
||||||
<td></td>
|
If you still have any questions, please contract system administrator.
|
||||||
</tr>
|
</p>
|
||||||
|
<p style="margin-left:2em;"></p>
|
||||||
|
<p style="text-indent:0;text-align:right;">{{ website_name }}</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr height="40">
|
</tbody>
|
||||||
<td style="padding-left:25px;padding-right:25px;font-size:18px;font-family:'微软雅黑','黑体',arial;">
|
</table>
|
||||||
Hello, {{ username }}:
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr height="15">
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr height="30">
|
|
||||||
<td style="padding-left:55px;padding-right:55px;font-family:'微软雅黑','黑体',arial;font-size:14px;">
|
|
||||||
We received a request to reset your password for {{ website_name }}.
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr height="30">
|
|
||||||
<td style="padding-left:55px;padding-right:55px;font-family:'微软雅黑','黑体',arial;font-size:14px;">
|
|
||||||
You can use the following link to reset your password in <span style="color:rgb(255,0,0)">20 minutes.</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr height="60">
|
|
||||||
<td style="padding-left:55px;padding-right:55px;font-family:'微软雅黑','黑体',arial;font-size:14px;">
|
|
||||||
<a href="{{ link }}" target="_blank"
|
|
||||||
style="color: rgb(255,255,255);text-decoration: none;display: block;min-height: 39px;width: 158px;line-height: 39px;background-color:rgb(80,165,230);font-size:20px;text-align:center;">Reset Password</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr height="10">
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr height="20">
|
|
||||||
<td style="padding-left:55px;padding-right:55px;font-family:'微软雅黑','黑体',arial;font-size:12px;">
|
|
||||||
If the button above doesn't work, please copy the following link to your browser and press enter.
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr height="30">
|
|
||||||
<td style="padding-left:55px;padding-right:65px;font-family:'微软雅黑','黑体',arial;">
|
|
||||||
<a href="{{ link }}" target="_blank" style="color:#0c94de;font-size:12px;">
|
|
||||||
{{ link }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr height="20">
|
|
||||||
<td style="padding-left:55px;padding-right:55px;font-family:'微软雅黑','黑体',arial;font-size:12px;">
|
|
||||||
If you did not ask that, please ignore this email. It will expire and become useless in 20 minutes.
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr height="20">
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
@ -302,11 +302,11 @@ class ApplyResetPasswordAPI(APIView):
|
|||||||
"link": f"{SysOptions.website_base_url}/reset-password/{user.reset_password_token}"
|
"link": f"{SysOptions.website_base_url}/reset-password/{user.reset_password_token}"
|
||||||
}
|
}
|
||||||
email_html = render_to_string("reset_password_email.html", render_data)
|
email_html = render_to_string("reset_password_email.html", render_data)
|
||||||
send_email_async.delay(SysOptions.website_name,
|
send_email_async.delay(from_name=SysOptions.website_name_shortcut,
|
||||||
user.email,
|
to_email=user.email,
|
||||||
user.username,
|
to_username=user.username,
|
||||||
f"{SysOptions.website_name} 登录信息找回邮件",
|
subject=f"Reset your password",
|
||||||
email_html)
|
content=email_html)
|
||||||
return self.success("Succeeded")
|
return self.success("Succeeded")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user