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

前端 未结 11 1906
北恋
北恋 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条回答
  •  猫巷女王i
    2020-12-10 12:34

    I had a same issue with smtp.gmail.com and fixed with the following steps

    1. changed my code as per berhauz comments
    2. changed in Gmail settings from this link: https://www.google.com/settings/security/lesssecureapps

提交回复
热议问题