| Note: Built-In Function Rules Usage Options |
This Email handling Built-In Function is used to add a file to be sent as an attachment to the current email.
Successive calls enable an internal list of attachments for sending to be built-up.
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Req | Full path to file including directories (Windows) and file. | 1 | 255 | ||
2 | A | Opt | The attachment filename seen by the recipient, which may differ from the filename in the Full Path argument if temporary files are being used. Default behavior is mail system specific. | 1 | 255 | ||
3 | A | Opt | Reserved for future use. This argument is currently unused. | 0 | 10 | ||
4 | N | Opt | Reserved for future use. This argument is currently unused. | 5 | 5 |
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 |
No attachments are defined immediately following a MAIL_START call.
Details of the email definition will be lost unless the MAIL_SEND Built-In Function is used to send the message.
If any error occurs, all details of the email definition will be lost. To restart processing, a new call to MAIL_START would be required.
The following 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(Define attachment file)
USE BUILTIN(MAIL_ADD_ATTACHMENT) WITH_ARGS('c:\config.sys' 'MyConfig.txt') TO_GET(#LEM_RETC)