aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/notification/NotificationMail.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-12-15 23:07:00 +1300
committerGitHub <noreply@github.com>2017-12-15 23:07:00 +1300
commit35a8bb5155292083ac4f3dc1a0fe1a9a3921a55f (patch)
treeba8cc0709e5d285710dc6eabebccadd977328fb5 /src/org/traccar/notification/NotificationMail.java
parentc60b59121e7afc32198beaed3b69cdd04a882219 (diff)
parentf8a481a3a4da75139a9b68beef83c3f0528b4572 (diff)
downloadtrackermap-server-35a8bb5155292083ac4f3dc1a0fe1a9a3921a55f.tar.gz
trackermap-server-35a8bb5155292083ac4f3dc1a0fe1a9a3921a55f.tar.bz2
trackermap-server-35a8bb5155292083ac4f3dc1a0fe1a9a3921a55f.zip
Merge pull request #3680 from Abyss777/fix_3679
Handle boolean parameters in mail configuration attributes
Diffstat (limited to 'src/org/traccar/notification/NotificationMail.java')
-rw-r--r--src/org/traccar/notification/NotificationMail.java12
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..6c81ecc79 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", String.valueOf(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", String.valueOf(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", String.valueOf(sslEnable));
}
String sslTrust = provider.getString("mail.smtp.ssl.trust");
if (sslTrust != null) {