title: Connection failing with pop3 using java mail api to Exchange server
body: <p>I am facing issue, connecting clients Exchange server via JAVAMAIL api using pop3. It works fine with gmail. Please look into this, if is something familiar.</p>
  
  <p>Following exception we get while trying to connect on client's Exchange server</p>
  
  <pre><code>  javax.mail.MessagingException: Connect failed;
  nested exception is:
  javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connecti
  on?
  at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:210)
  at javax.mail.Service.connect(Service.java:295)
  at TestPOP3Connection.run(TestPOP3Connection.java:23)
  Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext conne
  ction?
  at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown
  Source)
  at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Un
  known Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Sou
  rce)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Sou
  rce)
  at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java
  :507)
  at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
  at com.sun.mail.pop3.Protocol.&lt;init&gt;(Protocol.java:107)
  at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:261)
  at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:206)
  ... 2 more
  </code></pre>
  
  <p>Thanks in advance
  Rohit</p>