Description
-
Fires when user lists subfolders.
Syntax
-
Private Sub
object_ListFolders(User,
ParentFolder)
The ListFolders Event syntax has these parts:
object |
A wodImapServer
object. |
User |
An ImapUser object.
Reference to user who is listing available
folders. |
ParentFolder |
An ImapFolder
object. Reference to folder whose contents are
listed. |
Remarks
- 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 event will be fired. 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.
|