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 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)