Description
-
Fires when user wants to move folder to another
parent.
Syntax
-
Private Sub
object_MoveFolder(User,
ParentFolder, Folder,
DestinationFolder, DestinationName,
Action)
The MoveFolder Event syntax has these parts:
object |
A wodImapServer
object. |
User |
An ImapUser object.
Reference to user who wants to move folder. |
ParentFolder |
An ImapFolder
object. Reference to parent folder that contains folder
that will be moved. |
Folder |
An ImapFolder
object. Reference to folder that will be moved. |
DestinationFolder |
An ImapFolder
object. Reference to destination folder. (This will
become new parent folder.) |
DestinationName |
A String value. New name for the folder
once it is moved. |
Action |
An ImapActions
enumeration, as described in settings. Return value you
should fill with either Allow or Deny value, depending
if you will allow user to move folder or not. |
Settings
-
The settings for Action are:
|
Deny |
0 |
Deny execution of the
action. |
|
Allow |
1 |
Allow to execute
action. |
Remarks
- Typical action user will do while working with his mail
is to move specific folder to Trash. Of course, that is not
the only way, but it will be most common. When he does that,
this event is fired so you can decided if you will allow this
action or not. If you don't want folder to be moved, set
Action = Deny.
If you decide to allow folder to be moved, you should:
1. Remove referenced folder from collection stored in
ParentFolder
2. Add referenced folder to collection in
DestinationFolder
3. Update Folder.Name as
defined in DestinationName
4. Set Action = Allow
Depending on your implementation - you might also have to
physically move folder contents to new location.
When folder is moved his UID is changed - so update it
also.
|