9.137 MAIL_SEND
Used to send the constructed email message.
Arguments
None
Return Values
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Opt | Return Code OK - Action completed ER - Error occurred | 2 | 2 |
Technical Notes
On the Visual LANSA platform, MAIL_SET_OPTION calls may be required to logon to the MAPI mail provider. The information set in this way is not used until a MAIL_SEND call is issued at which time an attempt at logon validation will take place.
On IBM i the mail message is written to the IBM i Mail Server Framework (MSF). The mail message is then processed by a MSF job and delivered according to the schedule of the distribution queues. MSF must be configured and running before any mail messages can be delivered.
Details of the email definition will be lost unless the MAIL_SEND Built-In Function is used to send the message.
MAIL_SEND destroys the current mail information on return from the call even if the call is unsuccessful. To start processing a new message, a new call to MAIL_START is required.
Example
This example shows only this function. See the example for MAIL_START which defines all details of an Email message and then sends it by using Built-In Functions.
********** COMMENT(SEND the mail)
USE BUILTIN(MAIL_SEND) TO_GET(#LEM_RETC)