This commit is contained in:
Alex
2025-05-14 12:36:46 +02:00
parent 11740cb503
commit 8fcb73f24d

View File

@@ -46,7 +46,7 @@ func (s *EmailService) SendEmail(to string, subject string, body string, bodyTXT
func ParseTemplate(filename string, data interface{}) (string, error) {
// Read the email template file
logger.Error.Printf("Data: %#v", data)
templateDir := config.Templates.MailPath
tpl, err := template.ParseFiles(templateDir + "/" + filename)
if err != nil {
@@ -80,6 +80,7 @@ func (s *EmailService) SendVerificationEmail(user *models.User, token *string) e
UserID: user.ID,
}
logger.Error.Printf("USERIID: %#v", user.ID)
subject := constants.MailVerificationSubject
body, err := ParseTemplate("mail_verification.tmpl", data)
if err != nil {