Yes. Otherwise how will i get notified when a message is read/deleted in any
of those mailboxes. Is this way correct?
Sorry Henning. I thought you are busy and that is why you are not replying.
Any way thanks to Henning and Micheal for replying.
So i can't use webdav notifications also. Now the only way is
Auditing. But how am i telling that i need the success and failure of
messages in a folder? The code i did is as follows,
CoInitialize(NULL);
bstr_t yourServerName = "SERVERI";
bstr_t sUrl = "http:/" + yourServerName +
"/exchange/sampleuser1/inbox";
bstr_t sMethod = "PROPPATCH";
_variant_t vUser = L"SERVERI\\Administrator"; //sampleuser1
_variant_t vPassword = L"mks"; //sampleuser1
MSXML::IXMLHttpRequest* pXMLHttpReq=NULL;
HRESULT hr = ::CoCreateInstance(__uuidof(XMLHTTPRequest),
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IXMLHttpRequest),
(LPVOID*)&pXMLHttpReq);
if (S_OK != hr)
{
printf("XML Http Request pointer creation failed\n");
return 0;
}
_variant_t vAsync = (bool)FALSE;
pXMLHttpReq->open(sMethod,
sUrl,
vAsync,
vUser,
vPassword);
pXMLHttpReq->setRequestHeader((bstr_t)"Content-Type",
(bstr_t)"text/xml");
bstr_t sReq;
bstr_t sNewVal="audit_on_success:audit_on_failure";
sReq = "<?xml version='1.0'?>";
sReq = sReq + "<a:propertyupdate xmlns:a='DAV:' xmlns:o=" +
"'urn:schemas:httpmail:inbox'>" + "xmlns:f=
'http://schemas.microsoft.com/security/'>";
sReq = sReq + "<a:set><a:prop>";
sReq = sReq + "<s:security_descriptor>";
sReq = sReq + "<s:sacl>" + sNewVal + "<s:sacl>";
sReq = sReq + "</s:security_descriptor >";
sReq = sReq + "</a:prop></a:set></a:propertyupdate>";
// Send the request to set the search criteria.
pXMLHttpReq->send(sReq);
********************************************************
> Yes. Otherwise how will i get notified when a message is read/deleted in any
> of those mailboxes. Is this way correct?
[quoted text clipped - 105 lines]
> > > > > Or is there aome other way to do this?
> > > > > Thanks a lotz in advance
Melbin - 24 Aug 2005 11:00 GMT
Sorry Henning. I thought you are busy and that is why you are not replying.
Any way thanks to Henning and Micheal for replying.
So i can't use webdav notifications also. Now the only way is
Auditing. But how am i telling that i need the success and failure of
messages in a folder? I saw something like "urn:schemas:httpmail:read ". Is
this the one for read? then for delete what?
The code i did is as follows. This code is giving OK response but not
getting any read/delete events.
CoInitialize(NULL);
bstr_t yourServerName = "SERVERI";
bstr_t sUrl = "http:/" + yourServerName +
"/exchange/sampleuser1/inbox";
bstr_t sMethod = "PROPPATCH";
_variant_t vUser = L"SERVERI\\Administrator"; //sampleuser1
_variant_t vPassword = L"mks"; //sampleuser1
MSXML::IXMLHttpRequest* pXMLHttpReq=NULL;
HRESULT hr = ::CoCreateInstance(__uuidof(XMLHTTPRequest),
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IXMLHttpRequest),
(LPVOID*)&pXMLHttpReq);
if (S_OK != hr)
{
printf("XML Http Request pointer creation failed\n");
return 0;
}
_variant_t vAsync = (bool)FALSE;
pXMLHttpReq->open(sMethod,
sUrl,
vAsync,
vUser,
vPassword);
pXMLHttpReq->setRequestHeader((bstr_t)"Content-Type",
(bstr_t)"text/xml");
bstr_t sReq;
bstr_t sNewVal="audit_on_success:audit_on_failure";
sReq = "<?xml version='1.0'?>";
sReq = sReq + "<a:propertyupdate xmlns:a='DAV:'
xmlns:o='urn:schemas:httpmail:inbox'>";
sReq = sReq + "<a:set><a:prop>";
sReq = sReq + "<b:security_descriptor xmlns:b=
'http://schemas.microsoft.com/security/'>";
sReq = sReq + "<o:sacl>" + sNewVal + "</o:sacl>";
sReq = sReq + "</b:security_descriptor >";
sReq = sReq + "</a:prop></a:set></a:propertyupdate>";
pXMLHttpReq->send(sReq);
********************************************************
> Sorry Henning. I thought you are busy and that is why you are not replying.
> Any way thanks to Henning and Micheal for replying.
[quoted text clipped - 157 lines]
> > > > > > Or is there aome other way to do this?
> > > > > > Thanks a lotz in advance