Total Pageviews

Search This Blog

Friday, December 31, 2010

Contd..How to Add multiple Search Criteria using EWS

This is in continuation with the previous posts on integrating Dynamics AX with Exchange Web Services without installing Outlook on your box. If you missed the previous posts, you can browse them from here:

http://daxdilip.blogspot.com/2010/12/how-to-read-email-and-download.html

http://daxdilip.blogspot.com/2010/12/updated-code-to-read-email-using-ews.html


Had this requirement to add multiple search criterias for filtering emails based on different subjects. For this, I had to use the SearchFilterCollection method to achieve it, below is the code snippet on how to achieve it. The code is pretty self explanatory as the SearchFilterCollection object can handle logical operators like Or, And etc. and you can pass multiple SearchFilters to it as shown here.






If you want to delve more indepth, you can read the MSDN article below: http://msdn.microsoft.com/en-us/library/dd633695(EXCHG.80).aspx

No comments: