fix: 修复邮件配置smtps时的错误

This commit is contained in:
Captain.B 2020-12-11 11:37:38 +08:00
parent 5e22b003df
commit e9d5c8b9d2

View File

@ -43,8 +43,8 @@ public class MailService {
javaMailSender.setPassword(EncryptUtils.aesDecrypt(p.getParamValue()).toString());
break;
case "smtp.ssl":
javaMailSender.setProtocol("smtps");
if (BooleanUtils.toBoolean(p.getParamValue())) {
javaMailSender.setProtocol("smtps");
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
}
break;