How to Access an Exchange Server's Public Folders |
|
Most of the common mailbox-related folders (inbox, calendar, etc.) can be referenced from a CDO session object. However, no such shortcuts exist for the public folders. CDO and Exchange use a recursive folder structure, stored inside one or more infostores. You usually have to start from the top and work your way down. The public folder tree is always stored inside its own infostore, usually with the name Public Folders.
The attachment, CdoExample.zip, contains a Java example that creates a CDO session, logs on to a specified server, and prints out a tree based on the structure of the public folders of the server. Make sure to change the following before running the code:
1. The domain, username and password parameters for the AuthInfo.setDefault call.
2. The machine name or IP used when creating the session object (change to the name or IP address of the exchange machine).
3. The Exchange server name and Exchange alias used to logon to the Exchange server.
In addition, please make sure that cdo.jar - located in the JINTEGRA\lib directory - is included in the classpath.