sendMail
Command
Sends email from within a script. The parameters are contained in a SendMail property list.
Example:
sendmail(to: "testmanager@somecompany.com, tester1@somecompany.com", subject: "Test failed", body: "The very important test script generated an error. The log file is attached.", attachment: logfile)
Further Reading
Resources in our other reference manuals.