IMAP Search with Free Form Text
The Rebex Imap client supports searching with programatically specified collection of objects. It would be nice if the client can also support search with free form text. I don't think this should be too hard and will require only little refactoring. For example:
var messages = imap.Search(ImapListFields.Envelope, "OR SUBJECT Support SUBJECT Question");
var messages = imap.Search(ImapListFields.Envelope, "HEADER DomainKey-Signature google.com");
var messages = imap.Search(ImapListFields.Envelope, "SMALLER 42000");
var messages = imap.Search(ImapListFields.Envelope, "TEXT \"Mail Component\"");
-
Adminmartin.vobr (Admin, Rebex) commented
Maybe searching in headers and body text using ImapSearchCriteria.FullText would be enough? For details see http://www.rebex.net/secure-mail.net/features/imap-search.aspx#criteria
-
AdminLukas Pokorny (Admin, Rebex) commented
Hello, I just posted a sample code for free-form search that works with the current version of Rebex IMAP: http://forum.rebex.net/questions/123/imap-search-with-free-form-text/124#124
The problem with this kind of free form search approach is that it can get quite nasty - unless you only use very simple searches, you have to be familiar with the rest of RFC 3501 (know how to quote special characters, how to use modified UTF-7 to encode international characters, etc.). One of our design goals was to shield the user from ever having to deal with IMAP internals like this.
-
Stephen Zebo commented
I tried to see if I can implement the Search using the SendCommand / ReadResponse API, but it looks impossible with the current framework. There is no way I can construct ImapMessageInfo objects (there are no public constructors). This now starts to look like major oversight.
Please provide time frame when you can provide Search method with free-form search criteria?