Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using Exchange Server 2007 SP3

and I am able to connect exchange web service using following code
C#
ExchangeServiceBinding esb = new ExchangeServiceBinding();
esb.RequestServerVersionValue = new RequestServerVersion();
esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1;
esb.Credentials = new NetworkCredential("<user_id>", "<password>", "<domain>");
esb.Url = @"https://<server_fqdn>/ews/Exchange.asmx";</server_fqdn></domain></password></user_id>


I am looking for code to read only unread emails.

Could you please help me?
Posted

Well as you are new in Exchange Web Services ( EWS ) , I will suggest you to read this series of articles form Brij [ Check For Microsoft Exchange Section ] .
Microsoft Exchange[^]

If you check the Second Article,
Programming With Exchange Server 2007 (EWS) - Part 2[^], there is a section "Getting the Count of the Unread Items in a Specified Folder"
Which will do the job for you.

Hope this will help !
 
Share this answer
 
Dan wrote in his msdn blog for unread mail using ExchangeServiceBinding. Plz refer at: http://blogs.msdn.com/b/webdav_101/archive/2007/11/29/ews-csharp-list-unread-inbox-messages-using-a-restriction.aspx[^]
 
Share this answer
 
Comments
vangapally Naveen Kumar 30-Jul-12 8:07am    
Good link
Ganesan Senthilvel 30-Jul-12 11:22am    
Thanks
Carsten Giesen 27-Oct-22 11:07am    
Link is obsolet

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900