<< back to sysax.com Product page

6.2. Multi line messages and attachments

The mailaddline command is used to add an additional line to the message body that was created using the mailcreate command. The mailresult predefined status flag is set to the predefined constant success if the command completed successfully.

Exhibit 6.3. Syntax of command for adding multi lines to messages

mailaddline <additonal message line>;

Exhibit 6.4. Example for using the command for adding multi lines to messages

mailcreate "John Doe", "john@jdinc.com", "Script status", "Upload successful!"; #create email message

mailaddline "additional message line"; #add an additional line to the email message

The mailaddfile command is used to attach a file to the message body that was created using the mailcreate command. The mailresult predefined status flag is set to the predefined constant success if the command completed successfully.

Exhibit 6.5. Syntax of command for attaching a file to messages

mailaddfile <path to file to be attached>;

Exhibit 6.6. Example for using the command for attaching a file to messages

mailcreate "John Doe", "john@jdinc.com", "Script status", "Upload successful!"; #create email message

mailaddfile "c:\\temp\\status.txt"; #attach a file to the email message