andyedinborough / aenetmail

C# POP/IMAP Mail Client
369 stars 153 forks source link

FormatException Hotmail #64

Open Stromgald opened 12 years ago

Stromgald commented 12 years ago

Hi , i'm using aenetmail POP3 with Hotmail.

The application throw me FormatException in this part of Code :

    // Now we hope the only thing left in the characterSet is numbers.
    int codepageNumber = int.Parse(charSetUpper, System.Globalization.CultureInfo.InvariantCulture);

After that i recive always : You must authenticate first!

I'm using this Code :

using(var pop = new Pop3Client("pop3.live.com", "username", "password", 995, true)) { for (var i = pop.GetMessageCount() - 1; i >= 0; i--) {

                 try
                 { 
                     var msg = pop.GetMessage(i, false);
                     MessageBox.Show(msg.Raw);
                     MessageBox.Show(msg.Body);
                 }
                 catch(Exception ex)
                 {
                     Debug.WriteLine(ex.Message);
                 } 
                 pop.DeleteMessage(i); //WE DON'T NEED NO STINKIN' EMAIL!
             }
         }
Stromgald commented 12 years ago

I forgot to write that the String passed to codepageNumber is: 1252<HEAD

andyedinborough commented 12 years ago

It looks like the message is malformed. Could you forward me a copy of the message? andy.edinborough@gmail.com