wodImapServer ActiveX Component - DeleteMessage Event
    
 

Description

Fires when user wants to delete message.


Syntax

Private Sub object_DeleteMessage(User, Folder, Message, Action)



The DeleteMessage Event syntax has these parts:

Part Description
object A wodImapServer object.
User An ImapUser object. Reference to user who wants to delete the message.
Folder An ImapFolder object. Reference to folder that contains message that should be deleted.
Message An ImapMessage object. Reference to message that should be deleted.
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 delete message 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
DeleteMessage event is fired when user wants to delete a message from the folder. Depending on your choice, you can Allow this action or Deny it.

If you decide to allow this action, you should:

1. Remove message from collection of messages in the Folder
2. Delete message physically from your storage
3. Set Action = Allow