How do I get folder size with Exchange Web Services 2010 Managed API?

The first link is the way you want to go. The post describes that the default folders are not considered "managed folders" which is why you are getting the NRE on the ManagedFolderInformation property for some folders.

The first link is the way you want to go. The post describes that the default folders are not considered "managed folders" which is why you are getting the NRE on the ManagedFolderInformation property for some folders. What the post is suggesting is to add an Extended Property to the request for the folders.

Here's the MSDN page on how to do that using the Managed API. I tried to find a good example but didn't come up with one. This should point you in the right direction.

If I find anything I'll update my answer.

Using the EWS Managad APi, you can use this code to get the cumulative folder size of a mailbox: internal class Program { private static readonly ExtendedPropertyDefinition PidTagMessageSizeExtended = new ExtendedPropertyDefinition(0xe08, MapiPropertyType . Long); public static void Main(string args) { var service = new ExchangeService(ExchangeVersion. Exchange2010_SP1) {Credentials = new NetworkCredential("mail", "pw!")}; service.

AutodiscoverUrl("mail", url => true); var offset = 0; const int pagesize = 12; long size = 0; FindFoldersResults folders; do { folders = service. FindFolders(WellKnownFolderName. MsgFolderRoot, new FolderView(pagesize, offset, OffsetBasePoint.

Beginning) { Traversal = FolderTraversal. Deep, PropertySet = new PropertySet(BasePropertySet. IdOnly, PidTagMessageSizeExtended, FolderSchema.

DisplayName) }); foreach (var folder in folders) { long folderSize; if (folder. TryGetProperty(PidTagMessageSizeExtended, out folderSize)) { Console.Out. WriteLine("{0}: {1:00.00} MB", folder.

DisplayName, folderSize/1048576); size += folderSize; } } offset += pagesize; } while (folders. MoreAvailable); Console.Out. WriteLine("size = {0:0.00} MB", size/1048576); } }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions