ReadMail - cMapiHandler
Reads the mail message, addressed by, the passed message id and flags and returns the status of the action
Type: Function
Return Data Type: Integer
Parameters
| Parameter | Type | Description |
|---|---|---|
| sMessageId | String | Message id of to be read message |
| iFlags | Integer | Flags can be iOr'edConstantMeaning |
Syntax
Function ReadMail String sMessageId Integer iFlags Returns Integer
Call Example
Get ReadMail sMessageId iFlags to IntegerVariable
Description
The ReadMail function reads the mail message, addressed by, the passed message id and flags and returns the status of the action. The message contents will be placed in the properties and child objects of the oMapiHandler object.
This function returns one of the following error codes if not successful:
| Error code | Meaning |
|---|---|
| 2 | The flFlags parameter is invalid or one or more unspecified errors occurred. |
| 4 | An attachment could not be written to a temporary file because there was not enough space on the disk. |
| 5 | There was insufficient memory to proceed. No session handle was returned. |
| 9 | There were too many file attachments in the message. The message could not be read. |
| 10 | There were too many recipients of the message. The message could not be read. |
| 13 | An attachment could not be written to a temporary file. Check directory permissions. |
| 17 | An invalid message identifier was passed in the lpszSeedMessageID parameter. No message was found. |
| 19 | An invalid session handle was used for the lhSession parameter. The session was not terminated. |
Example
Get ReadMail Of oMapiSession sMessageId iReadMailFlags To iStatus
Return Value
Returns an error codes if not successful