diff --git a/src/main/java/net/geant/nmaas/notifications/NotificationController.java b/src/main/java/net/geant/nmaas/notifications/NotificationController.java
index 479709ca7e41fbcb2f1982131a3ba2c7de897879..762740d7c4e176ae4899267ace857a461e4ee268 100644
--- a/src/main/java/net/geant/nmaas/notifications/NotificationController.java
+++ b/src/main/java/net/geant/nmaas/notifications/NotificationController.java
@@ -31,7 +31,7 @@ public class NotificationController {
// TODO verify if captcha token must be verified
MailType mailType = mailAttributes.getMailType();
- if(mailType.equals(MailType.CONTACT_FORM) || mailType.equals(MailType.ISSUE_REPORT) || mailType.equals(MailType.NEW_DOMAIN_REQUEST)) {
+ if (mailType.equals(MailType.CONTACT_FORM) || mailType.equals(MailType.ISSUE_REPORT) || mailType.equals(MailType.NEW_DOMAIN_REQUEST)) {
eventPublisher.publishEvent(new NotificationEvent(this, mailAttributes));
} else {
throw new AuthenticationException("You are not allowed to send this mail");
diff --git a/src/main/java/net/geant/nmaas/notifications/NotificationManager.java b/src/main/java/net/geant/nmaas/notifications/NotificationManager.java
index 401a06eff27c9af5acb55971e2a36c494347a66c..ad62a89f3520b7a159ff5c70293faba432531cf3 100644
--- a/src/main/java/net/geant/nmaas/notifications/NotificationManager.java
+++ b/src/main/java/net/geant/nmaas/notifications/NotificationManager.java
@@ -70,7 +70,7 @@ public class NotificationManager {
try {
template = templateService.getHTMLTemplate();
} catch (IOException e) {
- log.error(String.format("Cannot retrieve html template: %s", e.getMessage()));
+ log.error("Cannot retrieve html template: {}", e.getMessage());
throw new ProcessingException(e);
}
@@ -193,7 +193,7 @@ public class NotificationManager {
}
private String getFilledTemplate(Template template, LanguageMailContentView langContent, UserView user, MailAttributes mailAttributes, MailTemplateView mailTemplate) throws IOException, TemplateException {
- boolean showAdditional = mailAttributes.getOtherAttributes().get("message") != null;
+ boolean showAdditional = mailAttributes.getMailType() == MailType.NEW_ACTIVE_APP && mailAttributes.getOtherAttributes().get("message") != null;
return FreeMarkerTemplateUtils.processTemplateIntoString(template, ImmutableMap.builder()
.putAll(mailTemplate.getGlobalInformation())
.put(MailTemplateElements.PORTAL_LINK, this.portalAddress == null ? "" : this.portalAddress)