javax.net.ssl.SSLException when sending mail using JavaMail

前端 未结 5 1961
走了就别回头了
走了就别回头了 2021-01-01 12:12
javax.mail.MessagingException: Exception reading response;
  nested exception is:
        javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?         


        
5条回答
  •  旧时难觅i
    2021-01-01 12:49

    I was getting the same exception when trying to send email via the Hotmail SMTP server at smtp.live.com. Here are the settings that worked for me in the end:

    mail.smtp.starttls.enable=true 
    mail.smtp.port=587
    

提交回复
热议问题