2011-02-05 84 views
0

我正在制作一个软件来检查一些hotmail帐户的东西。我正在使用OpenPop.NET库。奇怪的是,我得到无效的密码异常与一些帐户,而我确信密码是正确的,因为我可以正常登录而不pop3。我很感激,如果有人可以给我一个答案或其他方式连接到除pop3以外的Hotmail收件箱(不建议使用Web浏览器)。为什么我在尝试通过POP3连接时收到一些Hotmail帐户的无效密码?

这里是我使用的连接代码:

Pop3Client client = new Pop3Client(); 
      client.Connect("pop3.live.com", 995, true); 
      var username = file[i].Split(':')[0]; 
      var pass = file[i].Split(':')[1]; 
      try 
      { 
       client.Authenticate(username, pass); //I am pretty sure that username,pass holds the right values. 
       var msgs = client.GetMessageCount().ToString(); 
       updateList(i, msgs); //updates a listbox with message count for the hotmail account 
      } 
      catch (OpenPop.Pop3.Exceptions.InvalidPasswordException) 
      { 
       updateList(i, "Invalid Password"); 
      } 

感谢。

编辑:这是服务器响应非工作,我得到的占

The server didn't respond with +OK response. The response was: "-ERR mailbox could not be opened" 

回答

0

这听起来像服务器正试图阻止野蛮的攻击力!因为您正在检查帐户列表的凭证。你可能想检查错误信息或内部异常

+0

这是不正确的。我认为这可能是问题,但根据我的测试,非工作账户迟早不会工作。有点奇怪。 – deadlock 2011-02-05 01:22:44

相关问题