I’m working with Exchange mail client. While I’m filtering mail by To.Address or To.DisplayName field it doesn’t work, call is blocked on Exchange.ListMessages function and doesn’t returns.
While filtering mail by other fields like Subject or From it works fine.
Here below my snippet code:
MailQuery mq = null;
ExchangeQueryBuilder qb = new ExchangeQueryBuilder();
mq = qb.GetQuery();
Create mail client:
NetworkCredential credentials = new NetworkCredential(UserName, Password, Domain);
IEWSClient MailClient = EWSClient.GetEWSClient(ServerHost, credentials);
Get mails by query:
MailClient.ListMessages(pSubfolderUri, pMaxResult, pMailQuery); --> this line blocks and doesn’t return.