Skip to content

Commit

Permalink
improved email templates
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSlimvReal committed Oct 25, 2023
1 parent 054169b commit 98659ea
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
5 changes: 4 additions & 1 deletion keycloak/aam-theme/email/html/code-email.ftl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<html>
<body>
${kcSanitize(msg("emailCodeBody", code, ttl))}
<h1 style="color: #ff9800">Aam Digital - ${realmName}</h1>
${kcSanitize(msg("emailCodeBodyHtml", ttl))}
<h2>${code}</h2>
${kcSanitize(msg("emailFooterHtml"))?no_esc}
</body>
</html>
6 changes: 1 addition & 5 deletions keycloak/aam-theme/email/html/executeActions.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ ${kcSanitize(msg("passwordResetBodyHtml", link, user.username, realmName, linkEx
<#else>
${kcSanitize(msg("executeActionsBodyHtml", link, linkExpiration, realmName, requiredActionsText, linkExpirationFormatter(linkExpiration)))?no_esc}
</#if>
<br/>
<p>If you have any problems or questions, don’t hesitate to get in touch with us at <a href="mailto:[email protected]">[email protected]</a>.</p>
<br/>
<p> Best regards,</p>
<p>Your Aam Digital Team</p>
${kcSanitize(msg("emailFooterHtml"))?no_esc}
</body>
</html>
5 changes: 4 additions & 1 deletion keycloak/aam-theme/email/messages/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ emailVerificationBody=Your email has been linked to the Aam Digital user: {1}. T
emailVerificationBodyHtml=<p>Your email has been linked to the Aam Digital user: <b>{1}</b>. To verify your email, click the link below. After verifying your email, you will be forwarded to the Aam Digital application.</p><p><a href="{0}">Verify email</a></p><p>This link will expire within {3}.</p><p>Please keep in mind that your account gives access to personal information of your project''s participants that should be handled with care. <b>Don''t share your access with anyone.</b></p><p>After verifying your email, you can open the Application with the link below.</p><p><a href="https://{2}.aam-digital.com">Open Aam Digital</a></p>
passwordResetBody=Someone just requested to change the password for your Aam Digital account with the name: {1}. If this was you, click on the link below to reset it.\n\n{0}\n\nThis link and code will expire within {3}.\n\nIf you don''t want to reset your password, just ignore this message and nothing will be changed.
passwordResetBodyHtml=<p>Someone just requested to change the password for your Aam Digital account with the name: <b>{1}</b>. If this was you, click on the link below to reset it.</p><p><a href="{0}">Reset password</a></p><p>This link will expire within {3}.</p><p>If you don''t want to reset your password, just ignore this message and nothing will be changed.</p>
emailFooter=\n\nIf you have any problems or questions, don''t hesitate to get in touch with us at [email protected] .\n\n Best regards, \n\nYour Aam Digital Team
emailFooterHtml=<br/><p>If you have any problems or questions, don''t hesitate to get in touch with us at <a href="mailto:[email protected]">[email protected]</a>.</p><br/><p> Best regards,</p><p>Your Aam Digital Team</p>
emailCodeSubject={0} access code
emailCodeBody=Access code: {0}. \n\nThis code will expire within {1} seconds.
emailCodeBody=Access Code: {0} \n\nThis code will expire within {1} seconds.
emailCodeBodyHtml=Enter the code below. \n\nThis code will expire within {0} seconds.
2 changes: 2 additions & 0 deletions keycloak/aam-theme/email/text/code-email.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<#ftl output_format="plainText">
Aam Digital - ${realmName}\n\n
${msg("emailCodeBody", code, ttl)}
${msg("emailFooter")}
5 changes: 1 addition & 4 deletions keycloak/aam-theme/email/text/executeActions.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ ${msg("passwordResetBody",link, user.username, linkExpirationFormatter(linkExpir
<#else>
${msg("executeActionsBody",link, linkExpiration, realmName, requiredActionsText, linkExpirationFormatter(linkExpiration))}
</#if>
\n\n
If you have any problems or questions, don’t hesitate to get in touch with us at [email protected] .\n\n
Best regards,\n\n
Your Aam Digital Team
${msg("emailFooter")}
12 changes: 6 additions & 6 deletions keycloak/realm_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"ssl": "false",
"replyTo": "",
"replyToDisplayName": "",
"from": "[email protected]",
"fromDisplayName": "Aam Digital",
"host": "w01b1893.kasserver.com",
"port": "587",
"user": "[email protected]",
"password": "Bx2*4EdhVe@@"
"from": "<FROM_EMAIL_ADDRESS>",
"fromDisplayName": "<FROM_NAME>",
"host": "<EMAIL_SERVER_HOST>",
"port": "<EMAIL_SERVER_PORT>",
"user": "<EMAIL_SERVER_USER>",
"password": "<EMAIL_SERVER_PASSWORD>"
},
"eventsListeners": [
"metrics-listener",
Expand Down

0 comments on commit 98659ea

Please sign in to comment.