c#标记交换电子邮件为
问题描述:
我需要将电子邮件标记为在交换服务器上读取。c#标记交换电子邮件为
我使用以下方法来获得邮件,现在我需要将它们标记为已读
strQuery =
@"<?xml version=""1.0""?>
<g:searchrequest xmlns:g=""DAV:"">
<g:sql>
SELECT
""urn:schemas:mailheader:from"", ""urn:schemas:httpmail:htmldescription""
FROM
""https://********.*******.****/exchange/**.******/inbox/""
WHERE
""urn:schemas:httpmail:read"" = FALSE
AND ""DAV:contentclass"" = 'urn:content-classes:message'
</g:sql>
</g:searchrequest>";
我如何去这样做呢?
SP
答
"<?xml version=\"1.0\"?>"
+ "<a:propertyupdate xmlns:a=\"DAV:\" xmlns:d=\"urn:schemas-microsoft-com:exch-data:\" "
+ "xmlns:b=\"urn:schemas:httpmail:\" xmlns:c=\"xml:\">"
+ "<a:set><a:prop><b:read>" + 1
+ "</b:read></a:prop>"
+ "</a:set></a:propertyupdate>";
如此,你的问题:“如何删除邮件”或“如何将它们标记为已读”?这在你的答案中会有相当大的差异。 – 2010-10-18 15:18:18