Why do I receive Invalid Password for some Hotmail Accounts while trying to connect through POP3?

807 views Asked by At

I am making a software to check a list of hotmail accounts for something. I am using OpenPop.NET Library. The weird thing is that I get Invalid Password Exception with some accounts while I am sure that the password is correct because I can login without pop3 normally. I'd appreciate if someone can provide me an answer or an alternative way to connect to Hotmail inbox other than pop3 (Don't suggest using a Web Browser).

Here is the code I am using to connect:

 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");
            }

Thanks.

Edit: Here is the server response that I get from non-working accounts

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

There are 1 answers

5
RaM On

It sounds like the server is trying to prevent brutal force attacks !!! as you are checking credentials for a list of accounts. You may want to check the error message or inner-exception