Check for new mails in Hotmail using OpenPop.NET

Posted by deadlock on Stack Overflow See other posts from Stack Overflow or by deadlock
Published on 2011-01-17T20:28:21Z Indexed on 2011/01/17 20:53 UTC
Read the original article Hit count: 150

Filed under:
|
|

I was advised to use OpenPop lib to fetch my mail from hotmail. But I could'nt find any better way to check for new mail except disconnecting and reconnecting again. And there, I found a problem, Hotmail doesn't allow more than 1 pop3 login each 15 minutes. I want to know if it's possible to get the new mail without disconnecting and reconnecting to their pop3 server. Here is my code:

        Timer checker = new Timer();
        checker.Interval = 1000;
        checker.Tick += new EventHandler(delegate
        {
            Pop3Client client = new Pop3Client();
            client.Connect("pop3.live.com", 995, true);
            client.Authenticate("[email protected]", "myPassword");
            label1.Text = client.GetMessageCount().ToString();
            client.Disconnect();

        });
        checker.Start();

© Stack Overflow or respective owner

Related posts about c#

Related posts about pop3