5.5

Table Of Contents
Table 114. Bindings of the Send Email Scriptable Task Element
Parameter Name Binding Type
Bind to Existing or
Create Parameter? Binding Values
vm
IN Bind
n
Local Parameter: vm
n
Source parameter: vm[in-
parameter]
n
Type: VC:VirtualMachine
n
Description:
The virtual machine to
power on.
toAddress
IN Bind
n
Local Parameter: toAddress
n
Source parameter:
toAddress[in-parameter]
n
Type: string
n
Description:
The email address of the
person to inform of the
result of this workflow
body
IN Bind
n
Local Parameter: body
n
Source parameter:
body[attribute]
n
Type: string
n
Description: The email body
smtpHost
IN Create
n
Local Parameter: smtpHost
n
Source parameter:
smtpHost[attribute]
n
Type: string
n
Description:
The email SMTP server
fromAddress
IN Create
n
Local Parameter: fromAddress
n
Source parameter:
fromAddress[attribute]
n
Type: string
n
Description:
The email address of the
sender
subject
IN Create
n
Local Parameter: subject
n
Source parameter:
subject[attribute]
n
Type: string
n
Description:
The email subject
The Send Email scriptable task element requires the following scripted function.
//Create an instance of EmailMessage
var myEmailMessage = new EmailMessage() ;
//Apply methods on this instance that populate the email message
myEmailMessage.smtpHost = smtpHost;
myEmailMessage.fromAddress = fromAddress;
myEmailMessage.toAddress = toAddress;
myEmailMessage.subject = subject;
myEmailMessage.addMimePart(body , "text/html");
Developing with VMware vCenter Orchestrator
96 VMware, Inc.