aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-email-notifications-plugin
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-08-03 12:30:52 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-08-03 12:30:52 +0200
commit16201f701254aa492d05a623cf8b6cc69d71c0ba (patch)
treea75c9bd21180a6513edbe2d1050fad5503258a20 /plugins/sonar-email-notifications-plugin
parent91be5a8c9f2e642e2b88885a81b3b28f9372b80a (diff)
downloadsonarqube-16201f701254aa492d05a623cf8b6cc69d71c0ba.tar.gz
sonarqube-16201f701254aa492d05a623cf8b6cc69d71c0ba.zip
Fix classloader issue of EmailNotificationChannel
Diffstat (limited to 'plugins/sonar-email-notifications-plugin')
-rw-r--r--plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/EmailNotificationChannel.java4
1 files changed, 4 insertions, 0 deletions
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 {