Download Messages from Exchange Server Folders and Subfolders Recursively
Contents[ Hide ]
The EWSClient’s listSubFolders() method can be used to get messages from folders and subfolders from an Exchange Server mailbox recursively. This requires Exchange Server 2007 or greater because it uses EWS.
The example below shows how to download the whole mailbox (folders and subfolders) of an Exchange Server. The folder structure is created locally and all messages download.