Unverified Commit 7b52d617 authored by l2063610646's avatar l2063610646 Committed by GitHub
Browse files

fix(EmailServiceImpl): 解决由于jdk8之后默认禁用了部分tls协议,从而导致发送邮件失败的问题 (#809)

1、测试jdk版本:jdk1.8.0_351
parent d6cb5736
...@@ -86,6 +86,8 @@ public class EmailServiceImpl implements EmailService { ...@@ -86,6 +86,8 @@ public class EmailServiceImpl implements EmailService {
account.setSslEnable(true); account.setSslEnable(true);
// 使用STARTTLS安全连接 // 使用STARTTLS安全连接
account.setStarttlsEnable(true); account.setStarttlsEnable(true);
// 解决jdk8之后默认禁用部分tls协议,导致邮件发送失败的问题
account.setSslProtocols("TLSv1 TLSv1.1 TLSv1.2");
String content = emailVo.getContent(); String content = emailVo.getContent();
// 发送 // 发送
try { try {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment