qie.queueEmail¶
Signature: qie.queueEmail(to, subject, body, attachments*)
Returns: void
Queue an email message for sending (This does not report back to channel if the email did not send successfully).
Note
See this KB article for examples on how to include attachments.
Parameters¶
| Type | Name | Description | Default |
|---|---|---|---|
| String | to | comma separated email addresses | |
| String | subject | email subject line | |
| String | body | email message body | |
| emailAttachmentMap | attachments* | (optional) file attachments | null |
Example¶
// Define the email details
var to = "support@qvera.com,awesomesupport@qvera.com";
var subject = "Monthly Report";
var body = "Dear Team,\n" +
"Please find attached the monthly report.\n\n" +
"Best regards,\nQIE Admin";
// Create an attachment map
var attachments = {
"Report.pdf": qie.readFile("C:/temp/test.pdf")
};
// Send the email
/* Note: Email will be sent as soon as possible, but we won't know if it went through successfully or not. */
qie.queueEmail(to, subject, body, attachments);