Pragya Tripathi

Pragya Tripathi

  • NA
  • 1
  • 3.9k

DASL Queries - Retrieve mails from specific senders

Nov 16 2011 5:30 AM
i'm writing an application that retrieves mails, tasks and appointments based on the sender name. i'm using DASL query to filter mails based on sender name. But it doesn't seem to work. Below is the filter i've used:

  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?                                                                                                                           

Answers (1)