DeleteMail - cMapiHandler
Deletes a message from the message base
Type: Function
Return Data Type: Integer
Syntax
Function DeleteMail Returns Integer
Call Example
Get DeleteMail to IntegerVariable
Description
The DeleteMail function is used to delete a message from the message base. The message information should be present (found) before. This means that the properties of this class are filled with all message information. Use with great care because deleted messages are not retrievable.
This function returns one of the following error codes if not successful:
| Error code | Explanation |
|---|---|
| 2 | One or more unspecified errors occurred while sending the message. It is not known if the message was sent. |
| 5 | There was insufficient memory to proceed. |
| 17 | An invalid message identifier was passed in the lpszMessageID parameter. No message was deleted. |
| 19 | An invalid session handle was passed in the lhSession parameter No message was deleted. |
Example
Get DeleteMail Of oMapiSession To iRetval
It is a good usage when you use:
Send RereadMessage To oMapiSession
| Col 1 | Col 2 |
|---|---|
| Note: | Before invoking the DeleteMail message, verify that the correct information is present. |
Return Value
Returns an error code (2, 5, 17, or 19) if not successful