By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,648 Members | 1,489 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,648 IT Pros & Developers. It's quick & easy.

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

oll3i
100+
P: 679
Expand|Select|Wrap|Line Numbers
  1. Properties props = System.getProperties();
  2.  
  3.  
  4.  
  5.             props.setProperty("mail.store.protocol", "imaps");
  6.  
  7. props.setProperty("mail.imaps.host", "mail.purcon.pl");
  8. props.setProperty("mail.imaps.port", "143");
  9. props.setProperty("mail.imaps.connectiontimeout", "5000");
  10. props.setProperty("mail.imaps.timeout", "5000");
  11.  
  12.  
  13.         try {
  14.             // Initialize JavaMail session with SMTP server.
  15.  
  16.  
  17.  
  18. Session session = Session.getDefaultInstance(props, null);
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                        store = session.getStore("imaps");
  25.             store.connect("host","username", "pass");
  26.  
I can not connect to imaps.
Please help.
Aug 20 '13 #1
Share this Question
Share on Google+
2 Replies


oll3i
100+
P: 679
ok i found the solution
Aug 20 '13 #2

Rabbit
Expert Mod 10K+
P: 12,421
Can you post your solution in case someone else runs into the same problem?
Aug 20 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.