Discussion:
WebDAV mark as read?
(too old to reply)
Henning Krause [MVP - Exchange]
2006-12-07 17:05:30 UTC
Permalink
Hello,

try to set bit 0 of http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.

Haven't tried that, but looks promising.

Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread messages with
attachments then downloading those attachments. This part works fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute seems to
do
nothing. It doesn't mark read messages as unread and it doesn't mark
unread
messages as read. The PROPPATCH response indicates success, but it is not
reflected in the store on the server. I spent hours looking at various
resources, but couldn't find anything. What could be causing this?
Luke
2006-12-11 03:07:00 UTC
Permalink
Yeah, I tried that too. Eventually I figured out that adding "no-cache"
headers to all my requests fixed everything.
Post by Henning Krause [MVP - Exchange]
Hello,
try to set bit 0 of http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.
Haven't tried that, but looks promising.
Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread messages with
attachments then downloading those attachments. This part works fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute seems to
do
nothing. It doesn't mark read messages as unread and it doesn't mark
unread
messages as read. The PROPPATCH response indicates success, but it is not
reflected in the store on the server. I spent hours looking at various
resources, but couldn't find anything. What could be causing this?
sameen
2007-02-18 14:32:08 UTC
Permalink
How you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by Luke
Yeah, I tried that too. Eventually I figured out that adding "no-cache"
headers to all my requests fixed everything.
Post by Henning Krause [MVP - Exchange]
Hello,
try to set bit 0 of http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.
Haven't tried that, but looks promising.
Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread messages with
attachments then downloading those attachments. This part works fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute seems to
do
nothing. It doesn't mark read messages as unread and it doesn't mark
unread
messages as read. The PROPPATCH response indicates success, but it is not
reflected in the store on the server. I spent hours looking at various
resources, but couldn't find anything. What could be causing this?
sameen
2007-02-18 14:41:02 UTC
Permalink
Can you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by sameen
How you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by Luke
Yeah, I tried that too. Eventually I figured out that adding "no-cache"
headers to all my requests fixed everything.
Post by Henning Krause [MVP - Exchange]
Hello,
try to set bit 0 of http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.
Haven't tried that, but looks promising.
Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread messages with
attachments then downloading those attachments. This part works fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute seems to
do
nothing. It doesn't mark read messages as unread and it doesn't mark
unread
messages as read. The PROPPATCH response indicates success, but it is not
reflected in the store on the server. I spent hours looking at various
resources, but couldn't find anything. What could be causing this?
sameen
2007-02-22 07:19:07 UTC
Permalink
Hi

I am using following code to change the message read/unread status. In
response this code create new mail only with subject and their is no change
in message read/unread status.

Can you please help me in this.

thanks in advance

Here is the code


try
{
MyCredentialCache = new System.Net.CredentialCache();
MyCredentialCache.Add(new System.Uri(sUri),
"NTLM",
new System.Net.NetworkCredential(strUserName, strPassword,
strDomain)
);

// TODO: Replace with the URL of an object in Exchange Server

System.Uri myUri = new System.Uri(sUri);
HttpWRequest = (HttpWebRequest)WebRequest.Create(myUri);

// Add the network credentials to the request.
HttpWRequest.Credentials = MyCredentialCache;

string sQuery;
sQuery = "<?xml version='1.0'?>"
+ " <D:propertyupdate
xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
xmlns:e='urn:schemas:httpmail:' xmlns:z='urn:schemas:mailheader:'
xmlns:c='xml:' xmlns:f='http://schemas.microsoft.com/exchange/'
xmlns:g='urn:schemas-microsoft-com:office:office'
xmlns:h='http://schemas.microsoft.com/repl/'
xmlns:i='urn:schemas-microsoft-com:exch-data:' xmlns:D='DAV:'>"
+ " <D:set><D:prop><e:read
b:dt='boolean'>1</e:read></D:prop></D:set>"
+ " </D:propertyupdate>";

// Set Headers
HttpWRequest.KeepAlive = true;
HttpWRequest.Headers.Set("Pragma", "no-cache");
//HttpWRequest.Headers.Set("Translate", "f");
HttpWRequest.ContentType = "text/xml";
HttpWRequest.ContentLength = sQuery.Length;

//set the request timeout to 5 min.
HttpWRequest.Timeout = 300000;
// set the request method
HttpWRequest.Method = "PROPPATCH";

// You must store the data in a byte array
byte[] ByteQuery = System.Text.Encoding.ASCII.GetBytes(sQuery);
HttpWRequest.ContentLength = ByteQuery.Length;
Stream QueryStream = HttpWRequest.GetRequestStream();
// Write the data to be posted to the Request Stream
QueryStream.Write(ByteQuery, 0, ByteQuery.Length);
QueryStream.Close();

// Send Request and Get Response
HttpWebResponse HttpWResponse =
(HttpWebResponse)HttpWRequest.GetResponse();

// Get the Status code
int iStatCode = (int)HttpWResponse.StatusCode;
string sStatus = iStatCode.ToString();
Console.WriteLine("Status Code: {0}", sStatus);
// Get the request headers
string sReqHeaders = HttpWRequest.Headers.ToString();
Output += sReqHeaders;

// Read the Response Stream
Stream strm = HttpWResponse.GetResponseStream();
StreamReader sr = new StreamReader(strm);
string sText = sr.ReadToEnd();
Output += "\n Response: {0}"+ sText;

strm.Close();

MyCredentialCache = null;
HttpWRequest = null;
HttpWResponse = null;
QueryStream = null;
strm = null;
sr = null;
}
catch (Exception e)
{
Output = "\n {0} Exception caught." + e.Message;
}
Post by sameen
Can you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by sameen
How you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by Luke
Yeah, I tried that too. Eventually I figured out that adding "no-cache"
headers to all my requests fixed everything.
Post by Henning Krause [MVP - Exchange]
Hello,
try to set bit 0 of http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.
Haven't tried that, but looks promising.
Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread messages with
attachments then downloading those attachments. This part works fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute seems to
do
nothing. It doesn't mark read messages as unread and it doesn't mark
unread
messages as read. The PROPPATCH response indicates success, but it is not
reflected in the store on the server. I spent hours looking at various
resources, but couldn't find anything. What could be causing this?
Henning Krause [MVP - Exchange]
2007-02-22 22:23:30 UTC
Permalink
Hello,

to set the messageflags to 0, use this xml fragment:

<?xml version='1.0'?><D:propertyupdate xmlns:D='DAV:'>
<D:set><D:prop>
<xe070003 xmlns='http://schemas.microsoft.com/mapi/proptag/'>0</xe070003>
</D:prop></D:set></D:propertyupdate>

Best regards,
Henning Krause
Post by sameen
Can you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by sameen
How you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by Luke
Yeah, I tried that too. Eventually I figured out that adding "no-cache"
headers to all my requests fixed everything.
Post by Henning Krause [MVP - Exchange]
Hello,
try to set bit 0 of
http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.
Haven't tried that, but looks promising.
Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread messages with
attachments then downloading those attachments. This part works fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute seems to
do
nothing. It doesn't mark read messages as unread and it doesn't mark
unread
messages as read. The PROPPATCH response indicates success, but it is not
reflected in the store on the server. I spent hours looking at various
resources, but couldn't find anything. What could be causing this?
Al
2007-02-25 19:15:10 UTC
Permalink
dear Henning,
I am Sameen colleague.. we tried your recommendation but it did not work..
we are really newbies on webdav and struggling to make things moving.. my
guess is that we are doing something wrong with the way we are accessing the
email to alter the property but we don’t have a clear idea.. would you be so
kind and give us sample code or pseudo code to set an email flag to
read\unread?
Post by Henning Krause [MVP - Exchange]
Hello,
<?xml version='1.0'?><D:propertyupdate xmlns:D='DAV:'>
<D:set><D:prop>
<xe070003 xmlns='http://schemas.microsoft.com/mapi/proptag/'>0</xe070003>
</D:prop></D:set></D:propertyupdate>
Best regards,
Henning Krause
Post by sameen
Can you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by sameen
How you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by Luke
Yeah, I tried that too. Eventually I figured out that adding "no-cache"
headers to all my requests fixed everything.
Post by Henning Krause [MVP - Exchange]
Hello,
try to set bit 0 of
http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.
Haven't tried that, but looks promising.
Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread messages with
attachments then downloading those attachments. This part works fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute
seems to
do
nothing. It doesn't mark read messages as unread and it doesn't mark
unread
messages as read. The PROPPATCH response indicates success, but it
is not
reflected in the store on the server. I spent hours looking at various
resources, but couldn't find anything. What could be causing this?
Al
2007-02-26 14:50:08 UTC
Permalink
Dear Henning,
we tried your exchange library on
http://www.infinitec.de/libraries/exchange/default.aspx

and it had the same issue (not setting the read/unread). Other properties we
can control fine..
Have you encountered such issue yourself?
Post by Al
dear Henning,
I am Sameen colleague.. we tried your recommendation but it did not work..
we are really newbies on webdav and struggling to make things moving.. my
guess is that we are doing something wrong with the way we are accessing the
email to alter the property but we don’t have a clear idea.. would you be so
kind and give us sample code or pseudo code to set an email flag to
read\unread?
Post by Henning Krause [MVP - Exchange]
Hello,
<?xml version='1.0'?><D:propertyupdate xmlns:D='DAV:'>
<D:set><D:prop>
<xe070003 xmlns='http://schemas.microsoft.com/mapi/proptag/'>0</xe070003>
</D:prop></D:set></D:propertyupdate>
Best regards,
Henning Krause
Post by sameen
Can you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by sameen
How you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by Luke
Yeah, I tried that too. Eventually I figured out that adding "no-cache"
headers to all my requests fixed everything.
Post by Henning Krause [MVP - Exchange]
Hello,
try to set bit 0 of
http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.
Haven't tried that, but looks promising.
Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread
messages with
attachments then downloading those attachments. This part works
fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute
seems to
do
nothing. It doesn't mark read messages as unread and it doesn't mark
unread
messages as read. The PROPPATCH response indicates success, but it
is not
reflected in the store on the server. I spent hours looking at
various
resources, but couldn't find anything. What could be causing this?
sameen
2007-02-27 07:56:14 UTC
Permalink
Dear Henning

Thanks for your support we found the solution actually we need additional
parameter in WebDAV schema request.

" <?xml version=\"1.0\" encoding=\"utf-8\" ?>
<D:propertyupdate xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
xmlns:e='urn:schemas:httpmail:' xmlns:z='urn:schemas:mailheader:'
xmlns:c='xml:' xmlns:f='http://schemas.microsoft.com/exchange/'
xmlns:g='urn:schemas-microsoft-com:office:office'
xmlns:h='http://schemas.microsoft.com/repl/'
xmlns:i='urn:schemas-microsoft-com:exch-data:' xmlns:D='DAV:'>"

Try this out in your SDK it will resolve Read/Unread issue in your SDK

Regards
Sameen Khan
Post by Al
Dear Henning,
we tried your exchange library on
http://www.infinitec.de/libraries/exchange/default.aspx
and it had the same issue (not setting the read/unread). Other properties we
can control fine..
Have you encountered such issue yourself?
Post by Al
dear Henning,
I am Sameen colleague.. we tried your recommendation but it did not work..
we are really newbies on webdav and struggling to make things moving.. my
guess is that we are doing something wrong with the way we are accessing the
email to alter the property but we don’t have a clear idea.. would you be so
kind and give us sample code or pseudo code to set an email flag to
read\unread?
Post by Henning Krause [MVP - Exchange]
Hello,
<?xml version='1.0'?><D:propertyupdate xmlns:D='DAV:'>
<D:set><D:prop>
<xe070003 xmlns='http://schemas.microsoft.com/mapi/proptag/'>0</xe070003>
</D:prop></D:set></D:propertyupdate>
Best regards,
Henning Krause
Post by sameen
Can you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by sameen
How you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by Luke
Yeah, I tried that too. Eventually I figured out that adding "no-cache"
headers to all my requests fixed everything.
Post by Henning Krause [MVP - Exchange]
Hello,
try to set bit 0 of
http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.
Haven't tried that, but looks promising.
Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread
messages with
attachments then downloading those attachments. This part works
fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute
seems to
do
nothing. It doesn't mark read messages as unread and it doesn't
mark
unread
messages as read. The PROPPATCH response indicates success, but it
is not
reflected in the store on the server. I spent hours looking at
various
resources, but couldn't find anything. What could be causing this?
sameen
2007-05-16 07:57:01 UTC
Permalink
Hi Everybody

We develope and function that contain code mentioned below that is working
perfect with Exchange server 2003 but this is not working with Exchange
Server 2007.

Thanks

Best Regards
Sameen Khan
Post by Al
Dear Henning
Thanks for your support we found the solution actually we need additional
parameter in WebDAV schema request.
" <?xml version=\"1.0\" encoding=\"utf-8\" ?>
<D:propertyupdate xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
xmlns:e='urn:schemas:httpmail:' xmlns:z='urn:schemas:mailheader:'
xmlns:c='xml:' xmlns:f='http://schemas.microsoft.com/exchange/'
xmlns:g='urn:schemas-microsoft-com:office:office'
xmlns:h='http://schemas.microsoft.com/repl/'
xmlns:i='urn:schemas-microsoft-com:exch-data:' xmlns:D='DAV:'>"
Try this out in your SDK it will resolve Read/Unread issue in your SDK
Regards
Sameen Khan
Post by Al
Dear Henning,
we tried your exchange library on
http://www.infinitec.de/libraries/exchange/default.aspx
and it had the same issue (not setting the read/unread). Other properties we
can control fine..
Have you encountered such issue yourself?
Post by Al
dear Henning,
I am Sameen colleague.. we tried your recommendation but it did not work..
we are really newbies on webdav and struggling to make things moving.. my
guess is that we are doing something wrong with the way we are accessing the
email to alter the property but we don’t have a clear idea.. would you be so
kind and give us sample code or pseudo code to set an email flag to
read\unread?
Post by Henning Krause [MVP - Exchange]
Hello,
<?xml version='1.0'?><D:propertyupdate xmlns:D='DAV:'>
<D:set><D:prop>
<xe070003 xmlns='http://schemas.microsoft.com/mapi/proptag/'>0</xe070003>
</D:prop></D:set></D:propertyupdate>
Best regards,
Henning Krause
Post by sameen
Can you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by sameen
How you please guide me how can i use this flag (PR_MESSAGEFLAGS) from C#
WebDAV Application?
Post by Luke
Yeah, I tried that too. Eventually I figured out that adding
"no-cache"
headers to all my requests fixed everything.
Post by Henning Krause [MVP - Exchange]
Hello,
try to set bit 0 of
http://schemas.microsoft.com/mapi/proptag/xe070003
(PR_MESSAGEFLAGS) to 1.
Haven't tried that, but looks promising.
Best regards,
Henning Krause
I'm using WebDAV on Exchange 2003. I am looking for unread
messages with
attachments then downloading those attachments. This part works
fine.
The
problem is that setting the "urn:schemas:httpmail:read" attribute
seems to
do
nothing. It doesn't mark read messages as unread and it doesn't
mark
unread
messages as read. The PROPPATCH response indicates success, but it
is not
reflected in the store on the server. I spent hours looking at
various
resources, but couldn't find anything. What could be causing this?
Loading...