wodImapServer ActiveX Component - CreateFolder Event
    
 

Description

Fires when user wants to create subfolder.


Syntax

Private Sub object_CreateFolder(User, ParentFolder, Name, Action)



The CreateFolder Event syntax has these parts:

Part Description
object A wodImapServer object.
User An ImapUser object. Reference to user who wants to create new folder.
ParentFolder An ImapFolder object. Reference to folder where subfolder should be created.
Name A String value. String expression that holds name for new folder.
Action An ImapActions enumeration, as described in settings. Return value you should fill with either Allow or Deny value, depending if you will allow folder to be created or not.

Settings

The settings for Action are:

Constant Value Description
 Deny 0 Deny execution of the action.
 Allow 1 Allow to execute action.

Remarks
CreateFolder event is fired when user requests new folder to be created. This will usually happen when you define new users on your IMAP server. First time some user connects, his mail client will most probably immediately create INBOX, Drafts, Sent Items... folders, but perhaps also many more. Later on, users may create new folders as they require them so they can sort out received messages.

Each time such request comes from user, wodImapServer will fire this event so you can physically create new folder and set properties for it. If you decide you don't want to create such folder (for example, due to illegal folder name), you can set Action = Deny and error will be returned to the client.

Please note that this event is not fired unless such specific request comes from the user.