Commit 3e25997ba2e169f6eedbced4d436ab0117327bac

Authored by Igor Kulikov
1 parent 80f12791

Fix StartTLS mail setting.

... ... @@ -96,7 +96,7 @@ public class DefaultMailService implements MailService {
96 96 javaMailProperties.put(MAIL_PROP + protocol + ".port", jsonConfig.get("smtpPort").asText());
97 97 javaMailProperties.put(MAIL_PROP + protocol + ".timeout", jsonConfig.get("timeout").asText());
98 98 javaMailProperties.put(MAIL_PROP + protocol + ".auth", String.valueOf(StringUtils.isNotEmpty(jsonConfig.get("username").asText())));
99   - javaMailProperties.put(MAIL_PROP + protocol + ".starttls.enable", jsonConfig.get("enableTls"));
  99 + javaMailProperties.put(MAIL_PROP + protocol + ".starttls.enable", jsonConfig.has("enableTls") ? jsonConfig.get("enableTls").asText() : "false");
100 100 return javaMailProperties;
101 101 }
102 102
... ...