javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oll3i
    Contributor
    • Mar 2007
    • 679

    javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

    Code:
    Properties props = System.getProperties();
            
           
               
                props.setProperty("mail.store.protocol", "imaps");
    
    props.setProperty("mail.imaps.host", "mail.purcon.pl");
    props.setProperty("mail.imaps.port", "143");
    props.setProperty("mail.imaps.connectiontimeout", "5000");
    props.setProperty("mail.imaps.timeout", "5000");
    
    
            try {
                // Initialize JavaMail session with SMTP server.
          
                
             
    Session session = Session.getDefaultInstance(props, null);
     
    
                
                
           
                           store = session.getStore("imaps");
                store.connect("host","username", "pass");
    I can not connect to imaps.
    Please help.
  • oll3i
    Contributor
    • Mar 2007
    • 679

    #2
    ok i found the solution

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #3
      Can you post your solution in case someone else runs into the same problem?

      Comment

      Working...