2010-10-18 59 views
0

我需要將電子郵件標記爲在交換服務器上讀取。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

+0

如此,你的問題:「如何刪除郵件」或「如何將它們標記爲已讀」?這在你的答案中會有相當大的差異。 – 2010-10-18 15:18:18

回答

1
"<?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>"; 
相關問題