Skip to content

AttachFile

Attaches the specified file as an attachment to the message.

1
myMessage.AttachFile(file: ( string | FileInfo )):Message

Parameters

( string | FileInfo ) file
    The ID or FileInfo object representing the file to attach.

Returns

The current message instance.

Examples

Attach a file uploaded on the form

1
2
3
var msg = $Messages.New($Xml.Evaluate('Supplier/EMailAddress'), 'Purchase order', 'The purchase order is attached.');
msg.AttachFile($Xml.Evaluate('PurchaseOrderFile'));
msg.Send();

See Also