mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: reset password by Email
This commit is contained in:
@@ -33,3 +33,17 @@ func NewActivationEmail(userName, activateURL string) (string, string) {
|
||||
return fmt.Sprintf("【%s】注册激活", options["siteName"]),
|
||||
util.Replace(replace, options["mail_activation_template"])
|
||||
}
|
||||
|
||||
// NewResetEmail 新建重设密码邮件
|
||||
func NewResetEmail(userName, resetURL string) (string, string) {
|
||||
options := model.GetSettingByNames("siteName", "siteURL", "siteTitle", "mail_reset_pwd_template")
|
||||
replace := map[string]string{
|
||||
"{siteTitle}": options["siteName"],
|
||||
"{userName}": userName,
|
||||
"{resetUrl}": resetURL,
|
||||
"{siteUrl}": options["siteURL"],
|
||||
"{siteSecTitle}": options["siteTitle"],
|
||||
}
|
||||
return fmt.Sprintf("【%s】密码重置", options["siteName"]),
|
||||
util.Replace(replace, options["mail_reset_pwd_template"])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user