Skip to content
Snippets Groups Projects
Commit 36f1499f authored by juanf's avatar juanf
Browse files

SSDM-238 : Support SMTP ports other than 25 and other parameters.

SVN: 31544
parent 152d808f
No related branches found
No related tags found
No related merge requests found
...@@ -96,10 +96,18 @@ public final class MailClient extends Authenticator implements IMailClient ...@@ -96,10 +96,18 @@ public final class MailClient extends Authenticator implements IMailClient
properties = new Properties(); properties = new Properties();
properties.put(JavaMailProperties.MAIL_FROM, from); properties.put(JavaMailProperties.MAIL_FROM, from);
properties.put(JavaMailProperties.MAIL_SMTP_HOST, smtpHost); properties.put(JavaMailProperties.MAIL_SMTP_HOST, smtpHost);
properties.put(JavaMailProperties.MAIL_SMTP_PORT, smtpPort); if(smtpPort != null) {
properties.put(JavaMailProperties.MAIL_SMTP_USER, smtpUsername); properties.put(JavaMailProperties.MAIL_SMTP_PORT, smtpPort);
properties.put(MailClient.MAIL_SMTP_PASSWORD, smtpPassword); }
properties.put(MailClient.MAIL_TEST_ADDRESS, testAddress); if(smtpUsername != null) {
properties.put(JavaMailProperties.MAIL_SMTP_USER, smtpUsername);
}
if(smtpPassword != null) {
properties.put(MailClient.MAIL_SMTP_PASSWORD, smtpPassword);
}
if(testAddress != null) {
properties.put(MailClient.MAIL_TEST_ADDRESS, testAddress);
}
init(); init();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment