string query = "@SQL="
+ "\"" + "urn:schemas:httpmail:from" + "\""
+ " like '%"+txtfnamea.Text.Trim()+"%'";
Outlook.Items mailitems = inboxFolder.Items.Restrict(query);
The query is returning zero records for a sender even though its mails are present in the inbox. is there some syntactical error in the query?

Javeed M ShaikhRank #839 · 2.7K reputationPosted Nov 16, 2011, 5:24 AM EST
your query looks ok, can you try to hard code the name and search and see the results.