This commit is contained in:
eson 2023-09-05 15:38:53 +08:00
parent b160b11a78
commit 2019bce30e
2 changed files with 5 additions and 8 deletions

View File

@ -1,11 +1,9 @@
Dear {{ .UserName }}, Dear {{ .UserName }},
We have received your request to reset your {{ .CompanyName }} account password. We have received your request to reset the password for your {{ .CompanyName }} account.
Please click the button below to confirm your new password: Please click the button below to confirm your new password:
<h1 style="color: red; font-weight: bold;">{{ .MaskedPassword }}</h1> (This can be replaced by the masked new password)
<a href="{{ .ConfirmationLink }}" target="_blank" style="background-color: #008CBA; color: #FFFFFF; text-decoration: none; padding: 10px 15px; border-radius: 3px; font-weight: bold;">Confirm New Password</a> <a href="{{ .ConfirmationLink }}" target="_blank" style="background-color: #008CBA; color: #FFFFFF; text-decoration: none; padding: 10px 15px; border-radius: 3px; font-weight: bold;">Confirm New Password</a>
This password reset confirmation link will expire in 60 minutes. Please let us know if you have any other questions! This password reset confirmation link will expire in 60 minutes. Please let us know if you have any other questions!

View File

@ -62,16 +62,15 @@ func (l *UserResetTokenLogic) UserResetToken(req *types.RequestUserResetToken, u
userName := *user.FirstName + " " + *user.LastName userName := *user.FirstName + " " + *user.LastName
// 进入发送邮箱的系统 // 进入发送邮箱的系统
EmailManager.EmailTasks <- &EmailFormat{ EmailManager.EmailTasks <- &EmailFormat{
TemplateName: "reset_password.tpl", TemplateName: "get_reset_password_html.tpl",
UniqueKey: "reset_password-" + req.Email, UniqueKey: "reset_password-" + req.Email,
TargetEmail: req.Email, TargetEmail: req.Email,
CompanyName: "fusen", CompanyName: "fusen",
ConfirmationLink: resetToken, // 跳转连接 ConfirmationLink: l.svcCtx.Config.MainAddress + "/api/auth/reset/password/html?reset_token=" + resetToken, // 跳转连接
SenderName: "support@fusenpack.com", SenderName: "support@fusenpack.com",
SenderTitle: "register-valid", SenderTitle: "reset password",
Extend: map[string]string{ Extend: map[string]string{
"UserName": userName, "UserName": userName,
"ResetToken": resetToken,
}, },
} // email进入队 } // email进入队