4.2.1
Table Of Contents
- Using VMware vCenter Orchestrator Plug-Ins
- Contents
- Using VMware vCenter Orchestrator Plug-Ins
- Introduction to Orchestrator Plug-Ins
- Using the vCenter Server 5.0.1 Plug-In
- Configure the vCenter Server 5.0.1 Plug-In
- vCenter Server 5.0.1 Plug-In Scripting API
- Using the vCenter Server Plug-In Inventory
- Access the vCenter Server Plug-In Workflow Library
- vCenter Server Plug-In Workflow Library
- Batch Workflows
- Cluster and Compute Resource Workflows
- Custom Attributes Workflows
- Datacenter Workflows
- Datastore and Files Workflows
- Datacenter Folder Management Workflows
- Host Folder Management Workflows
- Virtual Machine Folder Management Workflows
- Basic Host Management Workflows
- Power Host Management Workflows
- Host Management Registration Workflows
- Networking Workflows
- Distributed Virtual Port Group Workflows
- Distributed Virtual Switch Workflows
- Standard Virtual Switch Workflows
- Resource Pool Workflows
- Storage Workflows
- Storage DRS Workflows
- Basic Virtual Machine Management Workflows
- Clone Workflows
- Linked Clone Workflows
- Linux Customization Clone Workflows
- Tools Clone Workflows
- Windows Customization Clone Workflows
- Device Management Workflows
- Move and Migrate Workflows
- Other Workflows
- Power Management Workflows
- Snapshot Workflows
- VMware Tools Workflows
- Using the vCO Library Plug-In
- Using the Database Plug-In
- Using the SSH Plug-In
- Using the XML Plug-In
- Using the Mail Plug-In
- Using the Net Plug-In
- Using the Enumeration Plug-In
- Index
Mail Plug-In Scripting API
The Mail scripting API contains one class, with its respective attributes and methods, that allow vCenter
Orchestrator workflows to send email messages. You can use the API to develop custom workflows.
EmailMessage Class
The EmailMessage class is the main class for creating email messages that you want to send from workflows.
The EmailMessage class defines the following attributes.
Attribute Returns Description
bccAddress String
Comma-separated list of blind carbon
copy email address entries
ccAddress String
Comma-separated list of carbon copy
email address entries
fromAddress String
Sender's email address
fromName String
Sender's name
password String
Password for authentication
smtpHost String
SMTP host name or IP address
smtpPort Number
SMTP port number (default is 25)
subject String
Email subject
toAddress String
Comma-separated list of email address
entries
username String
User name for authentication
The EmailMessage class defines the following methods.
Method Returns Description
addMimePart(Object,String):void Void
Adds a MIME part to the message.
sendMessage():void Void
Sends an email message.
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 Orchestrator
configuration interface. 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 ;
Using VMware vCenter Orchestrator Plug-Ins
60 VMware, Inc.