Check properties values
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1611311 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -239,12 +239,20 @@ public class JavaMailContainer implements Container {
|
||||
int portProps = 0;
|
||||
String portStr = props.getProperty("mail." + protocol + ".port");
|
||||
if (!UtilValidate.isEmpty(portStr)) {
|
||||
portProps = Integer.valueOf(portStr);
|
||||
try {
|
||||
portProps = Integer.valueOf(portStr);
|
||||
} catch (NumberFormatException e) {
|
||||
Debug.logError("The port given in property mail." + protocol + ".port is wrong, please check", module);
|
||||
}
|
||||
}
|
||||
if (portProps == 0) {
|
||||
portStr = props.getProperty("mail.port");
|
||||
if (!UtilValidate.isEmpty(portStr)) {
|
||||
portProps = Integer.valueOf(props.getProperty("mail.port"));
|
||||
try {
|
||||
portProps = Integer.valueOf(props.getProperty("mail.port"));
|
||||
} catch (NumberFormatException e) {
|
||||
Debug.logError("The port given in property mail.port is wrong, please check", module);
|
||||
}
|
||||
}
|
||||
}
|
||||
// override the port if have found one.
|
||||
|
||||
Reference in New Issue
Block a user