Showing
1 changed file
with
1 additions
and
1 deletions
... | ... | @@ -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 | ... | ... |