diff options
author | Abyss777 <abyss@fox5.ru> | 2017-12-15 12:28:29 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-12-15 14:03:15 +0500 |
commit | 5debe74dd68df32e86478a2e54e6f5efdddbf236 (patch) | |
tree | 4f3ded0595af97dcf4dae7a2a92e2fcf74b1792a /src/org/traccar/notification/NotificationMail.java | |
parent | 0c8bf8867456c55231f2aabf36970504d4e8cab7 (diff) | |
download | trackermap-server-5debe74dd68df32e86478a2e54e6f5efdddbf236.tar.gz trackermap-server-5debe74dd68df32e86478a2e54e6f5efdddbf236.tar.bz2 trackermap-server-5debe74dd68df32e86478a2e54e6f5efdddbf236.zip |
Handle boolean parameters in mail related attributes
Diffstat (limited to 'src/org/traccar/notification/NotificationMail.java')
-rw-r--r-- | src/org/traccar/notification/NotificationMail.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/notification/NotificationMail.java b/src/org/traccar/notification/NotificationMail.java index 8707b10da..1631a4c3a 100644 --- a/src/org/traccar/notification/NotificationMail.java +++ b/src/org/traccar/notification/NotificationMail.java @@ -45,18 +45,18 @@ public final class NotificationMail { properties.put("mail.smtp.host", host); properties.put("mail.smtp.port", String.valueOf(provider.getInteger("mail.smtp.port", 25))); - String starttlsEnable = provider.getString("mail.smtp.starttls.enable"); + Boolean starttlsEnable = provider.getBoolean("mail.smtp.starttls.enable"); if (starttlsEnable != null) { - properties.put("mail.smtp.starttls.enable", Boolean.parseBoolean(starttlsEnable)); + properties.put("mail.smtp.starttls.enable", starttlsEnable); } - String starttlsRequired = provider.getString("mail.smtp.starttls.required"); + Boolean starttlsRequired = provider.getBoolean("mail.smtp.starttls.required"); if (starttlsRequired != null) { - properties.put("mail.smtp.starttls.required", Boolean.parseBoolean(starttlsRequired)); + properties.put("mail.smtp.starttls.required", starttlsRequired); } - String sslEnable = provider.getString("mail.smtp.ssl.enable"); + Boolean sslEnable = provider.getBoolean("mail.smtp.ssl.enable"); if (sslEnable != null) { - properties.put("mail.smtp.ssl.enable", Boolean.parseBoolean(sslEnable)); + properties.put("mail.smtp.ssl.enable", sslEnable); } String sslTrust = provider.getString("mail.smtp.ssl.trust"); if (sslTrust != null) { |