andyedinborough / aenetmail

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

Messages aren't getting returned in PowerShell #37

Closed pcgeek86 closed 12 years ago

pcgeek86 commented 12 years ago

I'm trying to use this library in PowerShell, and I'm having a really hard time getting any messages returned. Here's the code I'm using:

        $SearchConditionClass = [AE.Net.Mail.SearchCondition];
        $SearchCondition = $SearchConditionClass::Undeleted();
        $ImapClient = New-Object -TypeName AE.Net.Mail.ImapClient -ArgumentList $ImapServer, $UserName, $Password;
        $Messages = $ImapClient.SearchMessages($SearchCondition);

In the $Messages variable, I'm getting the Lazy objects returned, but the "Value" property is null. Therefore, I can't view any of the message details.

Cheers, Trevor Sullivan http://trevorsullivan.net

pcgeek86 commented 12 years ago

Hmmmm, I'm trying out another .NET IMAP library, and I'm getting the same behavior. I'm able to connect to the IMAP server, but can't seem to retrieve any message content. Every single property is null:

From To Subject TextBody Attachments Headers etc.

On my other screen, I'm connected to, and viewing my Inbox via IMAP in Thunderbird, so I know that the IMAP server is working at least somewhat properly.

For what its worth, both this library, and the other library (ImapX), are able to see that my Inbox has (2) count messages in it. It's just that the message contents are completely null.

andyedinborough commented 12 years ago

Well, in our case, it looks like the size of the message isn't being returned as expected by the request. I'll work on it.

pcgeek86 commented 12 years ago

Wow this is working great! Thanks for the fix, Andy!