andyedinborough / aenetmail

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

POP3 Client | Cant download anything #200

Closed 0000day closed 7 years ago

0000day commented 7 years ago

Hi.

I've coded a minimal tool to test the pop3 client. Unfortunately it isn't doing anything. This is my current code:

    using (var pop3 = new Pop3Client())
    {
        pop3.Connect(
            CONNECTION_POP3.Host,
            CONNECTION_POP3.Port,
            CONNECTION_POP3.UseSSL,
            false);
        pop3.Login(EmailAccount.Email, EmailAccount.Password);
        // It is passing till here. IsConnected == true and IsAuthenticated == true

        // This returns 7 for me
        var messageCount = pop3.GetMessageCount();

        for (int i = messageCount-1; i >= 0; i--)
        {
            // This throws an exception:
            // from mta421a.sparkpostmail.com ([52.39.255.142]) by mx-ha.gmx.net
            // Dont know what's going on in here
            mails.Add(pop3.GetMessage(i, false));
        }
    }

Also to notice: I've got hundreds of emails in my mailboxes. I couldn't find a method to select a mailbox. Without, GetMessageCount() is returning "7" where I've got >1k emails. Also every attempt to download any message by index results in an error.

So is this POP3-Client useless? Am I doing it wrong somehow? (There isn't much to do wrong I guess as there are closely no methods).

Every help is appreciated, thanks.

EDIT_1: This seems to be an issue with the provider www.gmx.de. I just tested another account (www.arcor.de) and it worked.

0000day commented 7 years ago

I tested server other providers and it seems to work. So that problem was pointed to a single provider. I don't really mind then.