Catalyst Internet Mail .NET

InternetMail.DeleteMessage Method 

Flags a message for deletion from the current mailbox.

[Visual Basic]
Public Function DeleteMessage( _
   ByVal messageId As Integer _
) As Boolean
[C#]
public bool DeleteMessage(
   int messageId
);

Parameters

messageId
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

This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.

Remarks

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

See Also

InternetMail Class | SocketTools Namespace