Email Scripting Examples

<

Workflow scripted elements can include scripting of common email-related tasks. You can cut, paste, and adapt these examples into your scripted elements.

When you run a mail workflow, it uses the default mail server configuration that you set in the Configure mail workflow. You can override the default values by using input parameters, or by defining custom values in workflow scripted elements.

Obtain an Email Address

The following JavaScript example obtains the email address of the current owner of a running script.

var emailAddress = Server.getRunningUser().emailAddress ;

Send an Email

The following JavaScript example sends an email to the defined recipient, through an SMTP server, with the defined content.