Ok, what I am trying to do is set up a small web page in C# where I can check multiple email accounts at once. I have a Hotmail and a GMail account that I'd like to check, and just give me a number of "new" messages.
I tried using the example on the OpenPop.NET website, here:
http://hpop.sourceforge.net/exampleFetchAllMessages.php
Which is supposed to fetch all messages. However, I've tried various things, such as creating a certificateValidator method (I found this elsewhere on the web), as well as various AuthenticationMethod settings.
I keep getting exceptions. Things like:
OpenPop.Pop3.Exceptions.InvalidLoginException: Server did not accept user credentials ---> OpenPop.Pop3.Exceptions.PopServerException: The server did not respond with a + response. The response was: "-ERR Authentication failure: unknown user name or bad password. [Error="UserDisabled" AuthResult=27 Proxy=DM3PR15MB0911.namprd15.prod.outlook.com:1995:SSL]"
What's weird about this is that I can go into the regular hotmail site and log in successfully.
Obviously, I'm doing something wrong. Do I need to use OpenPop to retrieve email, or is there a better way?
I had the same difficulty and I solved it by setting the box of mail (hotmail in this case) to allow the connection of devices and applications using "pop".
I hope this can help you.