Skip to content

Commit 8f18a92

Browse files
committed
Notification Header rendering not working in some mail providers
1 parent 37d3082 commit 8f18a92

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

server/src/main/java/de/tum/cit/aet/thesis/mailvariables/MailVariablesBuilder.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,14 @@ private List<MailVariableDto> createGeneralVariables() {
135135
mailVariables.add(
136136
new MailVariableDto(
137137
"Notification URL Footer",
138-
"<hr><p style=\"text-align: center;\"><span style=\"font-size: 10px;\">Manage your notification settings </span><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"${config.clientHost + '/settings/notifications'}\"><span style=\"font-size: 10px;\">here</span></a>",
139-
"<hr><p style=\"text-align: center;\"><span style=\"font-size: 10px;\">Manage your notification settings </span><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\"><span style=\"font-size: 10px;\">here</span></a>",
138+
"<hr/>\n" +
139+
"<div style=\"text-align: center;font-size: 10px\">\n" +
140+
" Manage your notification settings <a th:href=\"${config.clientHost + '/settings/notifications'}\">here</a>\n" +
141+
"</div>",
142+
"<hr/>\n" +
143+
"<div style=\"text-align: center;font-size: 10px\">\n" +
144+
" Manage your notification settings <a th:href=\"\">here</a>\n" +
145+
"</div>",
140146
"General"
141147
));
142148

server/src/main/resources/db/changelog/manual/insert_tum_default_email_templates.sql

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,16 @@ The next step is to write an assessment about the thesis.
524524
<div style="text-align: center;font-size: 10px">
525525
Manage your notification settings <a th:href="${config.clientHost + ''/settings/notifications''}">here</a>
526526
</div>
527-
<br/><br/>', 'Presentation was updated'), ('THESIS_PRESENTATION_INVITATION', 'Thesis Presentation Invitation', '<h2 style="text-align: center;">INVITATION</h2><p style="text-align: center;">As part of their [[${thesis.type}]]''s thesis<br><strong>[[${thesis.students}]]</strong><br>will give their [[${presentation.type}]] presentation on<br><strong>[[${presentation.scheduledAt}]]</strong><br>online at [[${presentation.streamUrl}]]<br>and&nbsp;onsite in <strong>[[${presentation.location}]]</strong><br><br>Title:<br>[[${thesis.title}]]<br><br>Supervisor: [[${thesis.supervisors}]]<br>Advisor(s): [[${thesis.advisors}]]<br><br>The presentation will be in [[${presentation.language}]]. Everybody is cordially invited to attend.</p><p><strong>Abstract</strong><br><span th:utext="${thesis.abstractText}"></span></p><p>Full Details: [[${presentationUrl}]]</p><p><hr><p style="text-align: center;"><span style="font-size: 10px;">Manage your notification settings </span><a target="_blank" rel="noopener noreferrer nofollow" href="${config.clientHost + ''/settings/notifications''}"><span style="font-size: 10px;">here</span></a></p>', 'Public Presentation Invitation'), ('THESIS_PRESENTATION_INVITATION_CANCELLED', 'Thesis Presentation Cancelled', '<p>Dear [[${recipient.firstName}]],</p><p>The [[${thesis.type}]] thesis presentation of <strong>[[${thesis.students}]]</strong> scheduled at [[${presentation.scheduledAt}]] was cancelled.</p><p><hr><p style="text-align: center;"><span style="font-size: 10px;">Manage your notification settings </span><a target="_blank" rel="noopener noreferrer nofollow" href="${config.clientHost + ''/settings/notifications''}"><span style="font-size: 10px;">here</span></a></p>', 'Public Presentation was deleted'), ('THESIS_PRESENTATION_INVITATION_UPDATED', 'Thesis Presentation Updated', '<h2 style="text-align: center;">INVITATION</h2><p style="text-align: center;">As part of their [[${thesis.type}]]''s thesis<br><strong>[[${thesis.students}]]</strong><br>will give their [[${presentation.type}]] presentation on<br><strong>[[${presentation.scheduledAt}]]</strong><br>online at [[${presentation.streamUrl}]]<br>and&nbsp;onsite in <strong>[[${presentation.location}]]</strong><br><br>Title:<br>[[${thesis.title}]]</p><p style="text-align: center;"></p><p style="text-align: center;">Supervisor: [[${thesis.supervisors}]]<br>Advisor(s): [[${thesis.advisors}]]<br></p><p style="text-align: center;">The presentation will be in [[${presentation.language}]]. Everybody is cordially invited to attend.</p><p><strong>Abstract</strong><br><span th:utext="${thesis.abstractText}"></span></p><p>Full Details: [[${presentationUrl}]]</p><p><hr><p style="text-align: center;"><span style="font-size: 10px;">Manage your notification settings </span><a target="_blank" rel="noopener noreferrer nofollow" href="${config.clientHost + ''/settings/notifications''}"><span style="font-size: 10px;">here</span></a></p>', 'Public Presentation was updated'), ('THESIS_PROPOSAL_ACCEPTED', 'Thesis Proposal Accepted', '<p th:inline="text">Dear [[${recipient.firstName}]],</p>
527+
<br/><br/>', 'Presentation was updated'), ('THESIS_PRESENTATION_INVITATION', 'Thesis Presentation Invitation', '<h2 style="text-align: center;">INVITATION</h2><p style="text-align: center;">As part of their [[${thesis.type}]]''s thesis<br><strong>[[${thesis.students}]]</strong><br>will give their [[${presentation.type}]] presentation on<br><strong>[[${presentation.scheduledAt}]]</strong><br>online at [[${presentation.streamUrl}]]<br>and&nbsp;onsite in <strong>[[${presentation.location}]]</strong><br><br>Title:<br>[[${thesis.title}]]<br><br>Supervisor: [[${thesis.supervisors}]]<br>Advisor(s): [[${thesis.advisors}]]<br><br>The presentation will be in [[${presentation.language}]]. Everybody is cordially invited to attend.</p><p><strong>Abstract</strong><br><span th:utext="${thesis.abstractText}"></span></p><p>Full Details: [[${presentationUrl}]]</p><p><hr/>
528+
<div style="text-align: center;font-size: 10px">
529+
Manage your notification settings <a th:href="${config.clientHost + ''/settings/notifications''}">here</a>
530+
</div>', 'Public Presentation Invitation'), ('THESIS_PRESENTATION_INVITATION_CANCELLED', 'Thesis Presentation Cancelled', '<p>Dear [[${recipient.firstName}]],</p><p>The [[${thesis.type}]] thesis presentation of <strong>[[${thesis.students}]]</strong> scheduled at [[${presentation.scheduledAt}]] was cancelled.</p><p><hr/>
531+
<div style="text-align: center;font-size: 10px">
532+
Manage your notification settings <a th:href="${config.clientHost + ''/settings/notifications''}">here</a>
533+
</div>', 'Public Presentation was deleted'), ('THESIS_PRESENTATION_INVITATION_UPDATED', 'Thesis Presentation Updated', '<h2 style="text-align: center;">INVITATION</h2><p style="text-align: center;">As part of their [[${thesis.type}]]''s thesis<br><strong>[[${thesis.students}]]</strong><br>will give their [[${presentation.type}]] presentation on<br><strong>[[${presentation.scheduledAt}]]</strong><br>online at [[${presentation.streamUrl}]]<br>and&nbsp;onsite in <strong>[[${presentation.location}]]</strong><br><br>Title:<br>[[${thesis.title}]]</p><p style="text-align: center;"></p><p style="text-align: center;">Supervisor: [[${thesis.supervisors}]]<br>Advisor(s): [[${thesis.advisors}]]<br></p><p style="text-align: center;">The presentation will be in [[${presentation.language}]]. Everybody is cordially invited to attend.</p><p><strong>Abstract</strong><br><span th:utext="${thesis.abstractText}"></span></p><p>Full Details: [[${presentationUrl}]]</p><p><hr/>
534+
<div style="text-align: center;font-size: 10px">
535+
Manage your notification settings <a th:href="${config.clientHost + ''/settings/notifications''}">here</a>
536+
</div>', 'Public Presentation was updated'), ('THESIS_PROPOSAL_ACCEPTED', 'Thesis Proposal Accepted', '<p th:inline="text">Dear [[${recipient.firstName}]],</p>
528537
529538
<p th:inline="text">
530539
[[${proposal.approverFirstName}]] [[${proposal.approverLastName}]] approved the proposal of thesis "[[${thesis.title}]]".

0 commit comments

Comments
 (0)