command cdb_sendEmail pToI, pFrom, pSubject, pHTMLBody, pTextBody, pCCI, pBCCI, pAttachmentName, pAttachmentContent
Summary
This command will send an email with the specified parameters
Inputs
- pToI (String) - Comma-delimited list of email address(es) to send emails to.
- pFrom (String) - Email address of the sender.
- pSubject (String) - Subject of the email.
- *pHTMLBody (String) - HTML content of email.
- *pTextBody (String) - Text content of email (multipart is used, so this can be used as a fallback if HTML fails/is empty).
- *pCCI (String) - Comma-delimited list of email address(es) to CC emails to.
- *pBCCI (String) - Comma-delimited list of email address(es) to BCC emails to.
- *pAttachmentName (String) - If we have an attachment, the name of the attachment.
- *pAttachmentContent (Data) - If we have an attachment, the content of the attachment.
* optional parameter
Additional Requirements
This API call requires internet access.
Examples
Example 1:
cdb_sendEmail "[email protected]","[email protected]","Hello!","<p>This is the HTML Body!</p>","This is the Text Body."
# Email will be sent from Bob to Cora with subject "Hello!"
Example 2:
local tAttachment, tPath
# Load our attachment into memory
put "/home/username/attachment.pdf" into tPath
put url("binfile:"&tPath) into tAttachment
cdb_sendEmail "[email protected]","[email protected]","Email with Attachment",,"This has an attachment","[email protected]","[email protected]","name.pdf",tAttachment
# Email will be sent from Bob to Cora with attachment "name.pdf". It will also CC Justin, and BCC Bill.