wodImapServer ActiveX Component - DeleteMessage Method
      
 

Description

Called when user wants to delete message.


Return Type

None  


Syntax

object.DeleteMessage Owner, User, Folder, Message, Action



The DeleteMessage Method syntax has these parts:

Part Description
object An expression evaluating to an object of type IwodImapNotify.
Owner Required. A wodImapServer object.
User Required. An ImapUser object. Reference to user who wants to delete the message.
Folder Required. An ImapFolder object. Reference to folder that contains message that should be deleted.
Message Required. An ImapMessage object. Reference to message that should be deleted.
Action Required. 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
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.
 
DeleteMessage notification method is called 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