SendMail - cMapiHandler
Sends a message
Type: Function
Return Data Type: Integer
Parameters
| Parameter | Type | Description |
|---|---|---|
| iFlags | Integer | Flags can be iOr'edConstantMeaning |
| bSendDirect | Boolean | When TRUE the message is sent, when false it is saved to be sent later. |
Syntax
Function SendMail Integer iFlags Boolean bSendDirect Returns Integer
Call Example
Get SendMail iFlags bSendDirect to IntegerVariable
Description
The SendMail function sends a message. This function differs from the SendDocuments function in that it allows greater flexibility in message generation. The message is created from the values in the properties.
This function returns one of the following error codes if not successful:
| Error code | Meaning |
|---|---|
| 1 | The user canceled one of the dialog boxes. No message was sent. |
| 2 | One or more unspecified errors occurred. No message was sent. |
| 3 | There was no default logon, and the user failed to log on successfully when the logon dialog box was displayed. No message was sent. |
| 5 | There was insufficient memory to proceed. No message was sent. |
| 6 | MAPI_E_BLK_TOO_SMALL. No message was sent. |
| 9 | There were too many file attachments. No message was sent. |
| 10 | There were too many recipients. No message was sent. |
| 11 | The specified attachment was not found. No message was sent. |
| 12 | The specified attachment could not be opened. No message was sent. |
| 14 | A recipient did not appear in the address list. No message was sent. |
| 18 | The text in the message was too large. No message was sent. |
| 21 | A recipient matched more than one of the recipient descriptor structures and MAPI_DIALOG was not set. No message was sent. |
| 25 | One or more recipients were invalid or did not resolve to any address |
Example
Get SendMail Of oMapiSession iFlags bSendDirect To iRetval
Return Value
Returns an error code if not successful