Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query flagged emails in Exchange inbox using XML/WebDav

Status
Not open for further replies.

gerfla

Technical User
Joined
May 4, 2004
Messages
1
Location
US
I am trying to connect to an Exchange server and return the emails that are unflagged. I have succeeded in connecting to the mailbox/inbox. However when I try adding a where condition (.. i.e. where email is not flagged.) I get no response. In fact I recieve "page not found"
The following code works to return all the emails
Code:
        sQuery = "<?xml version='1.0'?>" & _
                 "<g:searchrequest xmlns:g='DAV:'>" & _
                 "<g:sql>SELECT ""DAV:displayname"" " & _
                 "FROM SCOPE('SHALLOW TRAVERSAL OF """ & sUrl & """')" & _
	            "</g:sql>" & _
                 "</g:searchrequest>"

        oXMLHttp.send sQuery

The following does not
Code:
        sQuery = "<?xml version='1.0'?>" & _
                 "<g:searchrequest xmlns:g='DAV:'>" & _
                 "<g:sql>SELECT ""DAV:displayname"" " & _
                 "FROM SCOPE('SHALLOW TRAVERSAL OF """ & sUrl & """')" & _
                 "WHERE ""urn:schemas:httpmail:messaggeflag"" = 0" & _
	            "</g:sql>" & _
                 "</g:searchrequest>"

        oXMLHttp.send sQuery

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top