Review the errors below and rectify: SSLException: Unrecognized SSL message, plaintext connection? Unrecognized SSL message, plaintext connection? And SMTP server name and other settings you may need to enter are listed on the Settings for POP or IMAP Access page under POP setting or IMAP setting.
or
How To Fix: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection in Confluence JNDI
- Javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection props.put('mail.smtp.socketFactory.fallback', 'true'); // Should be true In case you are running local applying spring i'd then exercise this command line.
- I am running Java Mail smtp configuration for my client with java mail api. It showing javax.mail.SendFailedException: Sending Failed; nested Exception is: class javax.mail.MessagingException: Exception reading response; nested Exception is: 'javax.net.ssl.sslexception unrecognized ssl message, plaintext connection?' My main code is.
- Email notifications had been working but no longer work. In CCA - Telephony - Users/Extensions - Voicemail: I have enable voicemail notification checked and enable email notification checked. I have email address, SMTP server, SMTP port and authentication. I'm not sure exactly where to begin.
- This command is sent using plain-text to 'upgrade' the connection to use SSL/TLS. Hudson/Jenkins instead attempts to start negotiating SSL on port 587, which is promptly rejected, resulting in the following error: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
I’ve been doing Exchange to Office 365 migrations lately and that means on-premises applications and devices can’t use the local Exchange server to send mail anymore.
Your options are to use the credentials of an Office 365 mailbox to send mail, set up a local SMTP relayer, or use a third-party SMTP service.
If you’ve opted to use an Office 365 login to send mail via SMTP, then you must use TLS, so the applications/devices sending mail must support sending mail with TLS on port 587.
This article focuses on Atlassian Confluence but may apply to other java applications using JNDI to configure mail.
Atlassian Confluence, Secure SMTP, and JNDI
Confluence has no way to set up secure SMTP with SSL or TLS from within the administration, so unfortunately you’re forced to configure Confluence to use a JNDI Location for SMTP. This involves moving around JARs and changing configuration files, which will end up slowing down your upgrades (see my script to make Confluence upgrades easier).
Start with the existing GMail configuration:
Most of what you need is already written for using gmail, but gmail uses SSL on SMTP, and these exact settings will fail if you use it with SMTP that starts plain and changes to secure with STARTTLS.
If you use it directly, you’ll get an error like you see at the top of the article:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection
This is because the existing settings include this line:
That line specifically forces SSL to be used, so you end up trying to connect to an SMTP server expecting plain text, and sending encrypted data to it so it doesn’t know what you’re talking about.
Removing that line is all you need to do differently aside from changing the SMTP host, port, etc. So if you’ve done those steps, you don’t need what you see below.
Step by Step
The entire process (mostly copied from the above article) goes like this:
Stop Confluence.
Move (don’t copy)
activation-1.0.2.jar
andmail-1.4.1.jar
from<confluence-install>/confluence/WEB-INF/lib
to<confluence-install>/lib
.
Note: The version numbers on these jar files may vary, but that should not matter.
As of Confluence 5.2.3,activation-1.0.2.jar
no longer exists, and does not need to be moved or downloaded.- Add the following to your
server.xml
file found in<confluence-install>/conf/
(add it just before the</Context>
tag – This is the modified version for Office 365):
- Add the following to your
Restart Confluence.
Choose the cog icon at top right of the screen, then choose Confluence Admin.
Choose Mail Servers.
Choose either Edit an existing configuration, or Add a new SMTP mail server.
- Edit the server settings as necessary, and set the JNDI Location as:
Note that the JNDI Location is case sensitive and must match the resource name specified inserver.xml
.
- Submit, and send a test email.
That should be it!
Using this info for a different application? Please tell me!
If you found this useful for something other than Confluence, I’m interested in hearing about it and probably listing it in the article.
I have a java complied package to speak with the https server on net. Running the compilation gives the following exception:
I think this is due to the connection established with the client machine is not secure. Is there any way to configure the local machine or ports in order to connect to the remote https server?
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.
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
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.
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.
Ssl Smtp Server
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.
It worked for me now, I have change the setting of my google account as below:
Though I have enabled SSL and TSL while running program in this link of same post. I spend a lot of time but than I realized and found this link.
And done 2 following steps and setting control in google. :
Disable the 2-step verification (password and OTP)
Enabling to allow to access less secure app(Allow less secure apps:
ON.)
Now I am able to send mail using above program.
As EJP said, it’s a message shown because of a call to a non-https protocol.
If you are sure it is HTTPS, check your bypass proxy settings, and in case add your webservice host url to the bypass proxy list
Adding this as an answer as it might help someone later.
Unrecognized Ssl Message Plaintext Connection
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.
if connection is FTPS test:
FTPSClient ftpClient = new FTPSClient(protocol, false);
protocol = TLS,SSL
and false = isImplicit.
Another reason is maybe “access denided”, maybe you can’t access to the URI and received blocking response page for internal network access. If you are not sure your application zone need firewall rule, you try to connect from terminal,command line.
For GNU/Linux or Unix, you can try run like this command and see result is coming from blocking rule or really remote address: echo | nc -v yazilimcity.net 443
Unrecognized Ssl Message Plaintext Connection Javamail Smtp
Maybe your default cerficate has expired. to renew it through admin console go “Security >SSL certificate and key management > Key stores and certificates > NodeDefaultKeyStore > Personal certificates” select the “default” alias and click on “renew” after then restart WAS.
If you’re running the Java process from the command line on Java 6 or earlier, adding this switch solved the issue above for me:
-Dhttps.protocols=”TLSv1″
Unsupported Or Unrecognized Ssl Message
Tags: exception, ssl, text