This article shows how use the UTILS.sendMail procedure in order to send attachments.
A file datasource is needed to get the files.
This example shows how it can be set up.
"Recipients" => ' ',
"Subject" => ' ',
"Body" => ' ',
"Attachments" => array(
(select file from (call "<filedatasource>.getFiles"() ) a where a.filePath like '%test.json%')),
"AttachmentNames" => array('test.json'),
"AttachmentMimeTypes" => array('application/json')
Recipients (required): Comma separated list of recipients. May not be an empty string.
Subject (required): Mail subject. May be an empty string.
Body (required): Mail body. May be an empty string. This parameter will accept both string and clob as input.
AttachmentName (optional): Comma separated list of attachments as shown in mail.
Attachment (optional): Array of attached files. Inside () - comma separated list of files
AttachmentMimeTypes (optional): Array of attachment MIME types for mail delivery.
forceSTARTTLS (optional): Enforces TLS.