问题描述:

使用spring+JavaMailSenderImpl发送邮件

发送端口为25

但是出现报错如下:

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure. Failed messages: javax.mail.MessagingException: Can't send command to SMTP host;

 

解决方法:

关于ssl使用的是465端口

普通发送邮件使用的是25端口

 

当使用ssl时,需要开端口,配置加密参数

 

当使用普通发送邮件时,考虑将ssl相关项关闭

 

所以,修复操作如下:

 

<prop key="mail.smtp.starttls.enable">false</prop>
<prop key="mail.smtp.ssl.enable">false</prop>
配置端口为25

 

相关文章:

  • 2022-02-22
  • 2022-12-23
  • 2021-04-10
  • 2022-01-22
  • 2021-07-29
  • 2022-01-30
  • 2022-12-23
猜你喜欢
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
相关资源
相似解决方案