【发布时间】:2022-01-03 17:27:37
【问题描述】:
我尝试使用 javax.mail 使用 SSL 发送电子邮件 我收到了下一个错误:
Error: Sending the email to the following server failed : 10.100.65.159:465. Cause: javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
我的java版本:
openjdk 版本“1.8.0_242” OpenJDK 运行时环境 Corretto-8.242.07.1 (build 1.8.0_242-b07) OpenJDK 64 位服务器 VM Corretto-8.242.07.1(内部版本 25.242-b07,混合模式)
我的java代码:
email.getMailSession().getProperties().put("mail.smtp.ssl.trust", "*");
email.getMailSession().getProperties().put("mail.smtp.starttls.enable", "true");
email.getMailSession().getProperties().put("mail.smtp.ssl.protocols", "SSLv3");
我的 javax.mail 版本:1.4.5
我从 java.security 文件的禁用算法列表中删除了 SSLv3
我仍然不知道可能是什么问题
有什么想法吗?
【问题讨论】:
-
你的邮件服务器支持 SSLv3 吗?
-
是的,我确定。