I think this is due to the connection established with the client machine is not secure.
It is due to the fact that you are talking to an HTTP server, not an HTTPS server. Probably you didn't use the correct port number for HTTPS.
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
You should have a local SMTP domain name that will contact the mail server and establishes a new connection as well you should change the SSL property in your programming below
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection
props.put("mail.smtp.socketFactory.fallback", "true"); // Should be true
I got the same error message when I forgot to log in to the company firewall, before performing a POST request through a proxy.
I got the same error. it was because I was accessing the https port using http.. The issue solved when I changed http to https.
Adding this as an answer as it might help someone later.
I had to force jvm to use the IPv4 stack to resolve the error. My application used to work within company network, but while connecting from home it gave the same exception. No proxy involved. Added the jvm argument
-Djava.net.preferIPv4Stack=true
and all the https
requests were behaving normally.
I face the same issue from Java application built in Jdevelopr 11.1.1.7 IDE. I solved the issue by unchecking the use of proxy form Project properties.
You can find it in the following: Project Properties -> (from left panle )Run/Debug/Profile ->Click (edit) form the right panel -> Tool Setting from the left panel -> uncheck (Use Proxy) option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With