DeleteMessage Method

Delete the specified message from the mail server.

Syntax

object.DeleteMessage( [Number] )

The DeleteMessage method syntax has the following parts:

Part Description
object An object expression that evaluates to an InternetMail object.
number A long integer which specifies the message to delete.

Return Type

Integer

Remarks

The DeleteMessage method marks the specified message for deletion. If the optional message number is not specified, then the current message is deleted. Once a message has been marked as deleted, any attempt to access it will result in an error.

The message will not actually be removed from the server until the Disconnect method is called or the InternetMail object is unloaded. To prevent messages which have been marked for deletion from actually being removed from the mailbox, call the Reset method.

This method will return value of zero if the action was successful. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

See Also

DeleteMessage Method, Disconnect Method, GetHeader Method, GetMessage Method, Reset Method


Copyright © 2008 Catalyst Development Corporation. All rights reserved.