5.26.4 ADD

The ADD command is used to include one or more file attachments on the email being formatted.

Files can be added directly to the email, or the ZIP keyword can be used to create an archive file of a nominated list of files. The archive file is then included as a single attachment on the email.

Syntax:

Command

Keyword

Value

Developer notes

ADD

ATTACHMENT

value

A single file can be attached to the email by nominating the file path and name.

*LIST

To include more than one file attachment, create a working list of files where the first field in the list is the file path and name. The optional second field in the working list is the attachment display name or the zip entry name.

ZIP

value

The name to be given to the zip archive created and attached to the email. The file name should include the suffix .zip for easy processing when the email is received.

The ZIP keyword will be ignored unless a list of files is provided using *LIST in the ATTACHMENT keyword.

 

Example

ADD ATTACHMENT(/folder/file.txt)

 

ADD ATTACHMENT(*LIST) #WRKLST(PATH,NAME)

 

ADD ATTACHMENT(*LIST) ZIP(reports.zip) #WRKLST(PATH,NAME)