This commit is contained in:
eson
2023-09-04 10:50:21 +08:00
parent 9c89f0fe4a
commit 9c013ac494
3 changed files with 46 additions and 22 deletions

View File

@@ -147,28 +147,9 @@ func (m *EmailSender) ClearExpiredTasks() {
}
}
const emailTemplate = `Subject: Your {{.CompanyName}} Account Confirmation
Dear
Thank you for creating an account with {{.CompanyName}}. We're excited to have you on board!
Before we get started, we just need to confirm that this is the right email address. Please confirm your email address by clicking on the link below:
{{.ConfirmationLink}}
Once you've confirmed, you can get started with {{.CompanyName}}. If you have any questions, feel free to reply to this email. We're here to help!
If you did not create an account with us, please ignore this email.
Thanks,
{{.SenderName}}
{{.SenderTitle}}
{{.CompanyName}}
`
func RenderEmailTemplate(companyName, confirmationLink, senderName, senderTitle string) []byte {
tmpl, err := template.New("email").Parse(emailTemplate)
tmpl, err := template.New("email").ParseFiles("../../html_template/email_register.tpl")
if err != nil {
log.Fatal(err)
}