java - Javax Mail: Unable to connect via pop3 (Command is not valid in this state) -


i'm trying recive mails server via pop3 using javax mail. got error

javax.mail.authenticationfailedexception: command not valid in state. 

i've tried change properties doesn't change result. i've checked mail client server reachable , password , username correct don't understand why throws exception. tried this:

properties properties = system.getproperties();  properties.put("mail.pop3.ssl.enable", "false"); properties.put("mail.pop3.starttls.enable", "true"); properties.put("mail.pop3.ssl.checkserveridentity", "true"); properties.put("mail.pop3.starttls.required", "true");  session session = session.getinstance(properties, null); store store = session.getstore("pop3");  store.connect(host, port, username, password); 

the javax.mail log says:

debug: setdebug: javamail version 1.4ea debug: getprovider() returning javax.mail.provider[store,pop3,com.sun.mail.pop3.pop3store,sun microsystems, inc] debug pop3: connecting host "xxx.xxx.xxx.xxx", port 110, isssl false s: +ok microsoft exchange pop3 service ready. c: user xxx s: -err command not valid in state. c: quit s: +ok microsoft exchange server 2010 pop3 server signing off. 

does knows error or has idea do?

thanks


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -