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

java.lang.IllegalStateException: Not connected

oll3i
100+
P: 679
Hello,
i get suddenly an error, it was already working
java.lang.IllegalStateException: Not connected
Expand|Select|Wrap|Line Numbers
  1. public void login(String u, String p) {
  2.  
  3.  
  4.         Properties props = System.getProperties();  
  5.             props.setProperty("mail.store.protocol", "imap");
  6.  
  7. props.setProperty("mail.imap.host", "mail.p.pl");
  8. props.setProperty("mail.imap.port", "143");
  9.  
  10.  
  11.         try {
  12.                   Session session = Session.getDefaultInstance(props, null);
  13.  
  14.  
  15.  
  16.             store = session.getStore("imap");
  17.             store.connect("mail.p.pl",u,p);
  18.  
Sep 16 '13 #1
Share this Question
Share on Google+
2 Replies


oll3i
100+
P: 679
i fixed that. thank You for your time
Sep 16 '13 #2

Rabbit
Expert Mod 10K+
P: 12,421
Can you post how you resolved the issue? It may be of help to other people.
Sep 16 '13 #3

Post your reply

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