Skip to content

Commit

Permalink
Do not attach service logo's (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 1, 2023
1 parent 65d65ff commit f9c9c8d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
26 changes: 13 additions & 13 deletions server/src/main/java/access/mail/MailBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,19 @@ private void sendMail(String templateName, String subject, Map<String, Object> v
setText(plainText, htmlText, helper);
helper.setTo(to);
helper.setFrom(emailFrom);
//Add logo, if there
if (variables.containsKey("groupedProviders")) {
List<GroupedProviders> groupedProviders = (List<GroupedProviders>) variables.get("groupedProviders");
groupedProviders.stream()
.filter(groupedProvider -> StringUtils.hasText(groupedProvider.getLogo()))
.forEach(groupedProvider -> {
try {
helper.addInline(groupedProvider.logoName(), new UrlResource(new URI(groupedProvider.getLogo())));
} catch (Exception e) {
//Can't be helped
}
});
}
// //Add logo, if there
// if (variables.containsKey("groupedProviders")) {
// List<GroupedProviders> groupedProviders = (List<GroupedProviders>) variables.get("groupedProviders");
// groupedProviders.stream()
// .filter(groupedProvider -> StringUtils.hasText(groupedProvider.getLogo()))
// .forEach(groupedProvider -> {
// try {
// helper.addInline(groupedProvider.logoName(), new UrlResource(new URI(groupedProvider.getLogo())));
// } catch (Exception e) {
// //Can't be helped
// }
// });
// }
doSendMail(message);
}

Expand Down
6 changes: 3 additions & 3 deletions server/src/main/resources/templates/invitation_en.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
{{#invitation.anyRoles}}
<ul>
{{#groupedProviders}}
<li><strong>{{name}}</strong> ({{organisation}}) - als <strong>{{rolesDisplay}}</strong></li>
<li><strong>{{name}}</strong> ({{organisation}}) - as <strong>{{rolesDisplay}}</strong></li>
{{/groupedProviders}}
</ul>
{{/invitation.anyRoles}}
{{#invitation.message}}
Personal message from Astrid
<div class="head" style="background-color: #f5f5f5;padding: 10px 0 20px 0;font-style: italic;">
Personal message from {{user.name}}
<div class="head" style="background-color: #f5f5f5;padding: 15px;margin-top:15px;font-style: italic;">
<p style=";white-space: pre-line;margin: 0;">
{{invitation.message}}
</p>
Expand Down

0 comments on commit f9c9c8d

Please sign in to comment.