1

I am looking for a library or a simple way to open a hotmail inbox and read new and old emails. A sample code would be much appreciated.

Thanks SOF.

MPelletier
  • 16,256
  • 15
  • 86
  • 137
dlock
  • 9,447
  • 9
  • 47
  • 67
  • What have you done so far? Any code that you can show? Have you tried searching for how to programmatically read Hotmail emails? – JasCav Jan 17 '11 at 17:28
  • 3
    Ehrm, what about just using POP? –  Jan 17 '11 at 17:29
  • @JasCav, I have searched and I can do it through POP,SMTP normally as it's done. I am just looking for simpler ways to do it. I am like doing a case study for all possible approaches. – dlock Jan 17 '11 at 17:31
  • @Time, Yes why not, any other suggestions? – dlock Jan 17 '11 at 17:31
  • @deadlock Sorry, I don't know C# and I don't even have a Windows machine. Let alone I'm using Hotmail. ^^ –  Jan 17 '11 at 17:32
  • 4
    @deadlock: Really, POP is going to be the easiest. The other way to read the inbox would be to scrape the HTML, but trust me, that will neither be easy, performant, stable, or easily maintainable. Try this library: http://sourceforge.net/projects/hpop/ – Nelson Rothermel Jan 17 '11 at 17:41

2 Answers2

5

I had the same problem and the gentleman from asp.net show me this link to go download openpop: http://hpop.sourceforge.net/

The link has a test project. But all I needed was:

        Pop3Client pop3Client = new Pop3Client();

        pop3Client.Connect("pop3.live.com", 995, true);
        pop3Client.Authenticate("user", "password");

        Message message = pop3Client.GetMessage(10);
        string messageText = message.ToMailMessage().Body;
user1019042
  • 2,428
  • 9
  • 43
  • 85
1

if you want to go with imap protocol ... this may help : using c# .net librarires to check for IMAP messages from gmail servers

Community
  • 1
  • 1