This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes JavaMail imap connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "JavaMail imap connection" Watch "JavaMail imap connection" New topic

JavaMail imap connection

Gerenne Vives
Ranch Hand

Joined: Feb 05, 2005
Posts: 60
Hi all,

I'm try connect at Exchange Server 2010 with Javamail for to read messages, but when try connect appear the following error:

Unrecognized SSL message, plaintext connection?
javax.mail.MessagingException: Unrecognized SSL message, plaintext connection?;
nested exception is: Unrecognized SSL message, plaintext connection?
at com.sun.mail.imap.IMAPStore.protocolConnect(
at javax.mail.Service.connect(
at javax.mail.Service.connect(
at conseritmailbatch.ConseritMailBatch.main(
Caused by: Unrecognized SSL message, plaintext connection?
at com.sun.mail.util.SocketFetcher.configureSSLSocket(
at com.sun.mail.util.SocketFetcher.createSocket(
at com.sun.mail.util.SocketFetcher.getSocket(
at com.sun.mail.iap.Protocol.<init>(
at com.sun.mail.imap.protocol.IMAPProtocol.<init>(
at com.sun.mail.imap.IMAPStore.protocolConnect(

My properties:


My code:

Session sesion = Session.getDefaultInstance(properties);
Store store=sesion.getStore("imap");
store.connect("X.X.X.X","", "1234");

In the line "store.connect("X.X.X.X","", "1234")" throws the exception.

Thanks in advance.

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: JavaMail imap connection
It's not a secret anymore!