The Email class provides the ability to send an email from a script.
Constructor
var email = new Email();
Properties
Name | Type | Description |
body | String | The content of the email message. |
from | String | The sender email address. |
recipients | String | The email recipients, as a comma-separated list of email addresses. |
replyTo | String | The reply-to email address. |
subject | String | The subject line of the email. |
smtpServer | String | The SMTP server to use for sending the email (read-only). |
smtpServer defaults to the SMS Admin SMTP server settings.
Refer to the Email action for an example of how email is used.
Methods
Return Value | Name | Description |
String | send() | Sends this email per its current configuration. On failure, a message is returned indicating the failure. |
Sample usage
var email = new Email(); email.from = “test@tippingpoint.com”; email.recipients = “user1@tippingpoint.com, user2@tippingpoint.com”; email.subject = “Test”; email.body = “Test Message”; email.send();