Index: plugins/email-ext/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
===================================================================
--- plugins/email-ext/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java (revision 9664)
+++ plugins/email-ext/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java (working copy)
@@ -416,6 +416,11 @@
private boolean useSsl;
/**
+ * If true use Submission port 587.
+ */
+ private boolean useSubmissionPort;
+
+ /**
* This is a global default subject line for sending emails.
*/
private String defaultSubject;
@@ -445,6 +450,9 @@
Properties props = new Properties(System.getProperties());
if(smtpHost!=null)
props.put("mail.smtp.host",smtpHost);
+ if (useSubmissionPort) {
+ props.put("mail.smtp.port", "587");
+ }
if (useSsl) {
/* This allows the user to override settings by setting system properties but
* also allows us to use the default SMTPs port of 465 if no port is already set.
@@ -495,6 +503,10 @@
return useSsl;
}
+ public boolean getUseSubmissionPort() {
+ return useSubmissionPort;
+ }
+
public String getDefaultBody() {
return defaultBody;
}
@@ -578,6 +590,9 @@
//specify if the mail server uses ssl for authentication
useSsl = req.getParameter("ext_mailer_smtp_use_ssl")!=null;
+ //specify if the mail server uses the submission port
+ useSubmissionPort = req.getParameter("ext_mailer_smtp_use_submission_port")!=null;
+
//Allow global defaults to be set for the subject and body of the email
defaultSubject = nullify(req.getParameter("ext_mailer_default_subject"));
defaultBody = nullify(req.getParameter("ext_mailer_default_body"));
Index: plugins/email-ext/src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/global.jelly
===================================================================
--- plugins/email-ext/src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/global.jelly (revision 9664)
+++ plugins/email-ext/src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/global.jelly (working copy)
@@ -36,6 +36,10 @@
help="/help/tasks/mailer/smtp-use-ssl.html">
+ Other advanced configurations can be done by setting system properties. + See + this document for possible values and effects. +