DeleteMessage Method  
 

Marks a message for deletion from the mailbox.

Syntax

object.DeleteMessage( MessageNumber )

Parameters

MessageNumber
Number of message to delete from the server. This value must be greater than zero. The first message in the mailbox is message number one.

Return Value

A value of zero is returned if the method succeeds. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

Remarks

The DeleteMessage method only flags the message for deletion. The message is not actually removed from the mailbox until the client disconnects from the server, however it will no longer be accessible by the client. To prevent deleted messages from actually being removed from the mailbox, call the Reset method.

See Also

Reset Method