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
The following does not
Any ideas?
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?