GeeCON Prague 2014*
The moose likes Other JSE/JEE APIs and the fly likes Unrecognized SSL message, plain text connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Unrecognized SSL message, plain text connection" Watch "Unrecognized SSL message, plain text connection" New topic
Author

Unrecognized SSL message, plain text connection

Rajasekhar Kintali
Greenhorn

Joined: May 08, 2011
Posts: 3
hi All,

I am trying to send mail using Java Mail API.

Using following configuration:

Properties props = System.getProperties();
props.put("mail.smtp.host", "localhost");
props.put("mail.smtp.port", "25");
props.put("mail.smtp.auth", "false");
props.put("mail.debug", "true");
Session session = Session.getDefaultInstance(props, null);

Getting following exception:

DEBUG: setDebug: JavaMail version 1.3.2
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
DEBUG SMTP: exception reading response: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1349)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1191)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:311)
at javax.mail.Service.connect(Service.java:233)
at javax.mail.Service.connect(Service.java:134)
at javax.mail.Service.connect(Service.java:86)
at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:144)
at javax.mail.Transport.send0(Transport.java:150)
at javax.mail.Transport.send(Transport.java:80)

My application server is in unix box.

could you please suggest, what extra parameters need to be set to avoid the exception ' exception reading response: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?'

Many Thanks,
Raj.
 
GeeCON Prague 2014
 
subject: Unrecognized SSL message, plain text connection