andyedinborough/aenetmail — Issue #37: Messages aren't getting returned in PowerShell
Author: pcgeek86
Created: 2012-02-26 05:49:17+00:00
State: open

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