diff --git a/modules/structs/mail.go b/modules/structs/mail.go index 8182d1d..ba275d1 100644 --- a/modules/structs/mail.go +++ b/modules/structs/mail.go @@ -139,7 +139,10 @@ func (m *Mail) RenderTemplate() (htmlBody, textBody string, err error) { bodyData := make(map[string]interface{}) for key, value := range m.BodyData.(map[string]interface{}) { - bodyData[key] = strings.ReplaceAll(value.(string), "\n", "
") + // check if value is a string + if _, ok := value.(string); ok { + bodyData[key] = strings.ReplaceAll(value.(string), "\n", "
") + } } m.BodyData = bodyData diff --git a/templates/dashboardSignUpEmailVerification.html b/templates/dashboardSignUpEmailVerification.html new file mode 100644 index 0000000..b05484c --- /dev/null +++ b/templates/dashboardSignUpEmailVerification.html @@ -0,0 +1,75 @@ + + + + + + + + + + + + + +
+

%title%

+

%header%

+

%text1%

+ + %verifyButton% +
+ + + %dsgvo% +
+ + diff --git a/templates/dashboardSignUpEmailVerification.txt b/templates/dashboardSignUpEmailVerification.txt new file mode 100644 index 0000000..e69de29 diff --git a/templates/templates.json b/templates/templates.json index df074aa..495102d 100644 --- a/templates/templates.json +++ b/templates/templates.json @@ -146,6 +146,36 @@ "dsgvo": { "de": "Datenschutzerklärung" } + }, + "dashboardSignUpEmailVerification": { + "mailSubject": { + "de": "Bitte bestätigen Sie Ihre E-Mail-Adresse", + "en": "Please verify your email address" + }, + "title": { + "de": "Bitte bestätigen Sie Ihre E-Mail-Adresse", + "en": "Please verify your email address" + }, + "header": { + "de": "Willkommen bei ZeitAdler!", + "en": "Welcome to ZeitAdler!" + }, + "text1": { + "de": "Bitte klicken Sie auf den untenstehenden Link, um Ihre E-Mail-Adresse zu bestätigen.", + "en": "Please click the link below to verify your email address." + }, + "verifyButton": { + "de": "E-Mail-Adresse bestätigen", + "en": "Verify email address" + }, + "footer": { + "de": "Vielen Dank, dass Sie unseren Service gewählt haben. Bei Fragen kontaktieren Sie uns gerne.", + "en": "Thank you for choosing our service. If you have any questions, please contact us." + }, + "dsgvo": { + "de": "Datenschutzerklärung", + "en": "Privacy Policy" + } } } } \ No newline at end of file