Unable to send an email using SMTP (Getting javax.mail.MessagingException: Could not convert socket to TLS;)

前端 未结 11 1902
北恋
北恋 2020-12-10 12:04

I have written the following code for sending email using javamail API through SMTP as TLS as SSL is not supported but I ended up with the following exception. Please see my

11条回答
  •  臣服心动
    2020-12-10 12:47

    If you don't want to use SSL, and you're using smtp instead of smtps try these settings

    mail.smtp.starttls.enable=false
    mail.transport.protocol=smtp
    

提交回复
热议问题