Description
-
Called when user lists subfolders.
Return Type
-
None
Syntax
-
object.ListFolders Owner,
User, ParentFolder
The ListFolders Method syntax has these parts:
object |
An expression evaluating to an object
of type IwodImapNotify. |
Owner |
Required. A wodImapServer
object. |
User |
Required. An ImapUser object.
Reference to user who is listing available
folders. |
ParentFolder |
Required. An ImapFolder
object. Reference to folder whose contents are
listed. |
Remarks
-
NOTE: This method is called only if you
implemented IwodImapNotify interface in your application,
and wodImapServer1.Notification
property has received reference to instance of your
implementation.
Before doing anything else, client will usually request
to receive listing of all available folders (mailboxes) for
the user. Once he requests that (and each subsequent time
too!!) this notification method will be called. Here, you
should:
1. Populate ParentFolder with the list of available folders
(use User.Folders
or Folder.SubFolders
property to do so)
2. Check if new folders are available and add them to the
collection
Second option may not be so much important - it will happen
only when folder is added from external source, and if you
implement first option properly, each time new session is
opened user will receive folder list properly.
Pay special attention to folder UIDs!! Immediately after
you call Add method to
add new folder to the collection, you should set
folder's UID property
which should be preserved among sessions!
If ParentFolder is NULL (Nothing in visual basic),
that means that user requested to receive list of root
folders. If so, instead of using Folder.SubFolders property
to populate folders, use User.Folders property instead.
|