From 16201f701254aa492d05a623cf8b6cc69d71c0ba Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 3 Aug 2011 12:30:52 +0200 Subject: Fix classloader issue of EmailNotificationChannel --- .../sonar/plugins/emailnotifications/EmailNotificationChannel.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/EmailNotificationChannel.java b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/EmailNotificationChannel.java index a988fe52a4e..df3f5ea7769 100644 --- a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/EmailNotificationChannel.java +++ b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/EmailNotificationChannel.java @@ -173,6 +173,10 @@ public class EmailNotificationChannel extends NotificationChannel { if (StringUtils.equalsIgnoreCase(configuration.getSecureConnection(), "SSL")) { email.setSSL(true); email.setSslSmtpPort(configuration.getSmtpPort()); + + // this port is not used except in EmailException message, that's why it's set with the same value than SSL port. + // It prevents from getting bad message. + email.setSmtpPort(Integer.parseInt(configuration.getSmtpPort())); } else if (StringUtils.isBlank(configuration.getSecureConnection())) { email.setSmtpPort(Integer.parseInt(configuration.getSmtpPort())); } else { -- cgit v1.2.3