send_email (host: STRING; timeout: INTEGER; sender, sender_name, subject, body, recipients, cc_recipients, bcc_recipients: STRING)
| host | IP address of the mail server through which to send the email (must be in ###.###.###.### format) | |
| timeout | Number of seconds to wait until the operation times out automatically (default is 0 and waits forever) | |
|
sender |
email address of the sender (automatically used as the 'reply-to' as well) | |
|
sender_name |
Real name of the sender | |
| subject | subject of the email | |
| body | Name of the page or question from the database to send as the body of the email. This item is flattened into a plain text format. | |
| recipients | Comma-separated list of recipient email addresses in the 'To:' field | |
| cc_recipients | Comma-separated list of recipient email addresses in the 'CC:' field | |
| bcc_recipients | Comma-separated list of recipient email addresses in the 'BCC:' field |
Send the contents of the item body in an email. All fields, conceals, etc. are calculated and filled in prior to converting to text, so answer sheets and performance reports can be sent. Any page or question can be sent, but it is best to stick with simple formatting (though tables are allowed and converted properly).
Recipient lists are comma-separated and should only use a comma as a delimiter between addresses. If there are any spaces, those will be used as part of an email address and may cause the function to fail.
Note: email is not supported on MacOS and only supported on Windows with an extra DLL distributable.
script report is send_email ('1.1.1.1', 30, 'john@yahoo.com', 'John Smith', 'test grades', 'answer_sheet', 'joe@yahoo.com, bill@yahoo.com', 'jill@yahoo.com', '') end