Hello
We are having problems using the IMAP search against Office 365 (Exchange Server).
The code is very simple. Search parameters are: from and Date. On a second test we try with from ,date and a custom X-Header
e SelectFolder(folder);
String CleanFrom = GetCleanEmail(from);
List<ImapSearchParameter> Params = new List<ImapSearchParameter>();
if (!String.IsNullOrEmpty(CleanFrom))
Params.Add(ImapSearchParameter.From(CleanFrom));
if ((date.HasValue) && (date.Value.Between(MinDate, MaxDate)))
Params.Add(ImapSearchParameter.Sent(date.Value));
if (!String.IsNullOrEmpty(sourceId))
Params.Add(ImapSearchParameter.Header(MailFlockXHeader, sourceId));
WaitIdle();
ImapMessageCollection List = Imap.Search(ImapListFields.Envelope, Params.ToArray());
In Both cases messages with different from and x-header are returned.
Some Prints of the parameters and results:
The params:
And the Results (The last one is wrong- note the sender and date). The X-Header is different of the param too. The erratic behavior repeats on several searches.
We are doing something wrong or this is an Exchange bug, or a library bug?
Thank you for the support.