andyedinborough / aenetmail

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

ImapClient.SearchMessages multiple conditions fails #147

Open sbheinric opened 10 years ago

sbheinric commented 10 years ago

This works:

Lazy[] lazyMsgs = ic.SearchMessages(SearchCondition.Subject(query));

...but when I broaden the search, I get no results:

Lazy[] lazyMsgs = ic.SearchMessages(SearchCondition.Subject(query) .Or(SearchCondition.Body(query)) .Or(SearchCondition.From(query)));

A similar problem was reported here: http://stackoverflow.com/questions/12371554/ae-net-mail-multiple-searchcondition-does-not-work

andyedinborough commented 10 years ago

I'm looking into this. :/ Sorry, it's taken so long.

chukwu commented 10 years ago

Any solution to this? Its really a huge demand. I'm facing a major problem with this.

andyedinborough commented 10 years ago

I have no doubt theres an issue, but I'm having trouble replicating it. On top of that, I'm completely slammed at work right now and haven't been able to put much time into it. :/

chukwu commented 10 years ago

A workaround to this might be to reiterate the return collection and thereby use LINQ collection methods such as Take() or Select() to re-filter but this also fails. Binding to the actually datatype doesn't working even with dynamic datatype. This library is popular. It needs maintenance. I'm sure you're doing your best