verify email on sign up
parent
28fe2ec25d
commit
dcc749c205
|
@ -139,8 +139,11 @@ func (m *Mail) RenderTemplate() (htmlBody, textBody string, err error) {
|
||||||
bodyData := make(map[string]interface{})
|
bodyData := make(map[string]interface{})
|
||||||
|
|
||||||
for key, value := range m.BodyData.(map[string]interface{}) {
|
for key, value := range m.BodyData.(map[string]interface{}) {
|
||||||
|
// check if value is a string
|
||||||
|
if _, ok := value.(string); ok {
|
||||||
bodyData[key] = strings.ReplaceAll(value.(string), "\n", "<br>")
|
bodyData[key] = strings.ReplaceAll(value.(string), "\n", "<br>")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m.BodyData = bodyData
|
m.BodyData = bodyData
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: "Arial", sans-serif;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
table.container {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 600px;
|
||||||
|
margin: 20px auto;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
table.content {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
color: #555;
|
||||||
|
margin: 0 0 15px;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
margin-top: 20px;
|
||||||
|
color: #777;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.confirm-button {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 10px 15px;
|
||||||
|
background-color: #3498db;
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.divider {
|
||||||
|
margin: 20px 0;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table class="container" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="content">
|
||||||
|
<h1>%title%</h1>
|
||||||
|
<p>%header%</p>
|
||||||
|
<p>%text1%</p>
|
||||||
|
|
||||||
|
<a href="{{.emailVerificationUrl}}" class="confirm-button"
|
||||||
|
>%verifyButton%</a
|
||||||
|
>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<p class="footer">%footer%</p>
|
||||||
|
<a class="footer" href="https://zeitadler.de/datenschutzerklaerung"
|
||||||
|
>%dsgvo%</a
|
||||||
|
>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -146,6 +146,36 @@
|
||||||
"dsgvo": {
|
"dsgvo": {
|
||||||
"de": "Datenschutzerklärung"
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue