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

This commit is contained in:
Captain.B 2020-12-11 11:37:38 +08:00
parent 5e22b003df
commit e9d5c8b9d2
1 changed files with 1 additions and 1 deletions

View File

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