Namespace Email
Email functionality.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
Email.getBlastStatistics(email_blast_KEY, options)
Retrieve statistics for an email blast, including the Status, and the Status_Count
|
<static> |
Email.send(to, subject, textContent, options)
Send an email
|
<static> |
Email.trigger(toAddress, triggerKey)
Send the email trigger identified by the key to the passed email address.
|
Method Detail
<static>
Email.getBlastStatistics(email_blast_KEY, options)
Retrieve statistics for an email blast, including the Status, and the Status_Count
try { var stats= Email.getBlastStatistics(1234,{domain:'gmail.com'}); } catch(e) { print('There was and error while trying to retrieve email statistics: ' + e.description); return; }
- Parameters:
- {String} email_blast_KEY
- The email_blast_KEY to retrieve statistics for
- {Object} options Optional
- An Object containing the optional e-mail parameters.
<static>
Email.send(to, subject, textContent, options)
Send an email
try { Email.send('sample@sample.com', 'Supporter ....', 'Please help us ...', { htmlContent: '<p>Please help us....</p>', from: 'sender <sender@example.com>' }); } catch(e) { print('There was and error while trying to send email: ' + e.description); return; }
- Parameters:
- {String} to
- The email address that you want to sent message to
- {String} subject
- The subject of the email
- {String} textContent
- The TEXT body part of your email.
- {Object} options Optional
- An Object containing the optional e-mail parameters.
- {String} htmlContent Optional
- The HTML body part of your email.
- {String} from Optional
- Sender of the email. You can supply just an e-mail address or a full header
- {String} cc Optional
- Copies to.
- {String} bcc Optional
- Blind copies to.
- {String} headers Optional
- Email headers that you want to set.
options {...}
<static>
Email.trigger(toAddress, triggerKey)
Send the email trigger identified by the key to the passed email address.
This function does not change the behavior of the trigger (timed triggers will
still be delayed) and "Individual Triggers" will override the toAddress
- Parameters:
- {String} toAddress
- The email address to send the trigger to. This can be overrident by "Individual Triggers" addressed to a specific person.
- triggerKey
- The database key of the trigger to send.