To continue reading for free, register below or login
To read more you must become a member of SearchDomino.com
');
// -->

View member feedback to this Ask the Expert Q&A.
I'm not sure where your code is running, but the Java API is basically the same regardless. Once you are set up with a lotus.domino.Session object, you first have to locate the user's mail file.
DbDirectory dir =
session.getDbDirectory(null);
Database db =
dir.openMailDatabase();
Then, use the Database..getView method to locate the inbox folder:
View inbox =
db.getView("($Inbox)")
Inbox and a couple of other built-in folders have a special name. If you're not sure of the name of the folder you want to find, open the database in Domino Designer and look at how the folder naming scheme goes. To scan through all the folders, you can use Database..getViews to get all the views and iterate through them looking for folders.
However, this is somewhat inefficient since each view will have its index updated when you load its View object, which is work that didn't need doing. You can also find all the Folder design notes using a NoteCollection with a selection formula. There's a function at this URL which shows how to do this.
MEMBER FEEDBACK TO THIS ASK THE EXPERT Q&A:
This is a good answer, but I'm not sure that was the question asked. I'm betting that the actual question here meant "folders" = "subdirectories".
Doug J.
Do you have comments on this Ask the Expert question and response? Let us know.
|