1
Answer

DASL Queries - Retrieve mails from specific senders

Pragya Tripathi

Pragya Tripathi

13y
2.2k
1
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)