Skip to content

Commit

Permalink
feat: add email template for daily notification
Browse files Browse the repository at this point in the history
* consultants can receive daily notifications about open enquiries of an agency
  • Loading branch information
hill-daniel committed Jan 25, 2022
1 parent 90bec7f commit 15b5d66
Show file tree
Hide file tree
Showing 4 changed files with 226 additions and 0 deletions.
85 changes: 85 additions & 0 deletions src/main/resources/templates/daily-enquiry-notification.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv='Content-Type' content='text/html charset=UTF-8'/>
</head>

<body style="margin: 0; padding: 0; background-color: #FAF6F3; width: 100%; font-family: 'Roboto', 'Arial', sans-serif; overflow-x: hidden;">
<div align='center'>
<table width='100%' style='table-layout: fixed; border-collapse: collapse; max-width: 580px; margin: 0 auto;' cellspacing='0' cellpadding='0' border="0">
<tr>
<td width='5%' style="padding: 0;"><!-- spacer --></td>
<td width='90%' style='background-color: #fff; padding: 0; '>
<table style="table-layout: fixed; width: 100%" cellspacing='0' cellpadding='0' border="0">
<thead style='background-color: #CC1E1C;'>
<td width="10%">
<div style="margin: 16px; width: 100%">
<a href=''><img style='width: 46px; height: 60px;' src='cid:caritas-logo.jpg'/></a>
</div>
</td>
<td style='padding: 0; text-align: center; width: 90%; padding-right: 10%;'>
<!-- logo -->

<!-- claim -->
<h1 style='color: #FFFFFF; font-size: 26px; font-weight: bold; line-height: 26px; padding-bottom: 0; margin-bottom: 0;'>Beratung & Hilfe</h1>
<div style='color: #FFFFFF; font-size: 12px; line-height: 19px;'>Online. Anonym. Sicher.</div>
</td>
</thead>

<tbody>
<tr style="background-color: #CC1E1C;">
<td colspan='2' cellspacing='0' cellpadding='0' style="padding: 10px 0 0; text-align: center;">
<img src="cid:illustration-top.png" style="vertical-align: bottom;">
</td>
</tr>

<tr>
<td colspan='2' cellspacing='0' cellpadding='0' style="padding: 0; text-align: center;">
<img src="cid:illustration-bottom.png">
</td>
</tr>

<tr>
<td cellspacing='0' cellpadding='0' style="padding: 0;" colspan="2">
<div style="color: #3F373F; margin: 16px; font-size: 16px; line-height: 21px; font-family: 'Open Sans', 'OpenSans', 'Arial', 'sans-serif';">
<b>Liebe(r) <span data-th-text="${consultant_name}"></span>,</b>
<br/><br/>
es liegen <span data-th-text="${enquiries}"></span> Erstanfragen in der Beratungsstelle <span data-th-text="${agency_name}"></span> vor.
<br/><br/>
Liebe Grüße
<br/>
Ihr Caritas Team
</div>
</td>
</tr>

<tr>
<td colspan='2' style='text-align: center; padding: 0; '>
<div style="margin: 16px 0 42px;">
<a data-th-href="${url}"><img src='cid:button_anfrage_ansehen_1x.png'></a>
</div>

<span style='clear: both;'><!-- clear --></span>
</td>
</tr>
</tbody>
</table>
</td>
<td width='5%' style="padding: 0;"><!-- spacer --></td>
</tr>
</table>

<table style="width: 100%">
<tr>
<td style='text-align: center; padding: 0;'>
<div style="text-align: center; padding-top: 8px;">
<a data-th-href="${urlimpressum}" style="color: #8C878C; text-decoration: none; font-size: 14px; line-height: 19px;">Impressum</a>
<span style="color: #8C878C; text-decoration: none; font-size: 14px; line-height: 19px;">&nbsp; | &nbsp;</span>
<a data-th-href="${urldatenschutz}" style="color: #8C878C; text-decoration: none; font-size: 14px; line-height: 19px;">Datenschutz</a>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
30 changes: 30 additions & 0 deletions src/main/resources/templates/daily-enquiry-notification.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"htmlTemplateFilename":"daily-enquiry-notification.html",
"subject":"${subject}",
"templateImages" : [
{
"filename":"caritas-logo.jpg",
"filetype":"image/jpg"
},
{
"filename":"illustration-bottom.png",
"filetype":"image/png"
},
{
"filename":"illustration-top.png",
"filetype":"image/png"
},
{
"filename":"button_anfrage_ansehen_1x.png",
"filetype":"image/png"
}
],
"templateDataFields":
[
"subject",
"agency_name",
"url",
"consultant_name",
"enquiries"
]
}
85 changes: 85 additions & 0 deletions templates/daily-enquiry-notification.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv='Content-Type' content='text/html charset=UTF-8'/>
</head>

<body style="margin: 0; padding: 0; background-color: #FAF6F3; width: 100%; font-family: 'Arial', sans-serif; overflow-x: hidden;">
<div align='center'>
<table width='100%' style='table-layout: fixed; border-collapse: collapse; max-width: 580px; margin: 0 auto;' cellspacing='0' cellpadding='0' border="0">
<tr>
<td width='5%' style="padding: 0;"><!-- spacer --></td>
<td width='90%' style='background-color: #fff; padding: 0; '>
<table style="table-layout: fixed; width: 100%" cellspacing='0' cellpadding='0' border="0">
<thead style='background-color: #5a2572;'>
<td width="10%">
<div style="margin: 30px 16px 16px; width: 100%">
<a href=''><img style='width: 40px; height: 40px;' src='cid:logo.png'/></a>
</div>:
</td>
<td style='padding: 0; text-align: center; width: 90%; padding-right: 10%;'>
<!-- logo -->

<!-- claim -->
<h1 style='color: #FFFFFF; font-size: 26px; font-weight: bold; line-height: 26px; padding-bottom: 0; margin-bottom: 0;'>Beratung & Hilfe</h1>
<div style='color: #FFFFFF; font-size: 12px; line-height: 19px;'>Online. Anonym. Sicher.</div>
</td>
</thead>

<tbody>
<tr style="background-color: #5a2572;">
<td colspan='2' cellspacing='0' cellpadding='0' style="padding: 10px 0 0; text-align: center;">
<img width="80" height="40" src="cid:illustration-top.png" style="vertical-align: bottom;">
</td>
</tr>

<tr>
<td colspan='2' cellspacing='0' cellpadding='0' style="padding: 0; text-align: center;">
<img width="80" height="40" src="cid:illustration-bottom.png">
</td>
</tr>

<tr>
<td cellspacing='0' cellpadding='0' style="padding: 0;" colspan="2">
<div style="color: #3F373F; margin: 16px; font-size: 16px; line-height: 21px; font-family: 'Open Sans', 'OpenSans', 'Arial', 'sans-serif';">
<b>Liebe(r) <span data-th-text="${consultant_name}"></span>,</b>
<br/><br/>
es liegen <span data-th-text="${enquiries}"></span> Erstanfragen in der Beratungsstelle <span data-th-text="${agency_name}"></span> vor.
<br/><br/>
Liebe Grüße
<br/>
Ihr Diakonie Team
</div>
</td>
</tr>

<tr>
<td colspan='2' style='text-align: center; padding: 0; '>
<div style="margin: 40px 0 56px;">
<a data-th-href="${url}" style="color: #fff; background: #5a2572; padding: 16px 24px; text-transform: uppercase; font-weight: bold; text-decoration: none;">Anfrage ansehen</a>
</div>

<span style='clear: both;'><!-- clear --></span>
</td>
</tr>
</tbody>
</table>
</td>
<td width='5%' style="padding: 0;"><!-- spacer --></td>
</tr>
</table>

<table style="width: 100%">
<tr>
<td style='text-align: center; padding: 0;'>
<div style="text-align: center; padding-top: 8px;">
<a data-th-href="${urlimpressum}" style="color: #666; text-decoration: none; font-size: 14px; line-height: 19px;">Impressum</a>
<span style="color: #666; text-decoration: none; font-size: 14px; line-height: 19px;">&nbsp; | &nbsp;</span>
<a data-th-href="${urldatenschutz}" style="color: #666; text-decoration: none; font-size: 14px; line-height: 19px;">Datenschutz</a>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
26 changes: 26 additions & 0 deletions templates/daily-enquiry-notification.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"htmlTemplateFilename":"daily-enquiry-notification.html",
"subject":"${subject}",
"templateImages" : [
{
"filename":"logo.png",
"filetype":"image/png"
},
{
"filename":"illustration-bottom.png",
"filetype":"image/png"
},
{
"filename":"illustration-top.png",
"filetype":"image/png"
}
],
"templateDataFields":
[
"subject",
"agency_name",
"url",
"consultant_name",
"enquiries"
]
}

0 comments on commit 15b5d66

Please sign in to comment.