Email hooks

Send an email from Cloud Management Platform (CMP) when a job, order, or other process reaches a trigger point

An email hook is an action type, so it can be attached anywhere other actions can. Its subject and body are templates, which lets a single hook produce a message tailored to the job that fired it.

Email hook fields

In addition to the fields common to all actions, such as name and description, an email hook has the following. None of them are required.

Field Description
Subject The subject line of the email.
Body The body of the email.
From Address The address the email is sent from. If it is empty, CMP uses Email default from address from Admin > Email Settings.
Send to Users Choose from all users in your instance, including those imported from LDAP. The email goes to the address shown on each user’s detail page.
Send to Address A comma-separated list of recipient addresses. It accepts templated addresses, such as {{ server.owner.user.email }}.
Send to Job Owner When selected, the email goes to the owner of the job the hook is attached to. The job details page shows each job’s owner.

The Subject, From Address, and Body fields can all be templated using parameter templates.

Available template variables

Four variables are available when the subject and body are rendered. Not all of them exist at every trigger point; an unavailable variable is ignored.

  • job: The job executing this email hook.
  • order: The order this job belongs to, if any, such as a provisioning or deletion job.
  • server: The server associated with the trigger point or related job. If more than one is available, this is the first server.
  • owner: The job owner, order requestor, or server owner. For more information, see Action context.

How the email is sent

When CMP runs an email hook, it first builds the complete list of recipients from the fields above. It then sends a single plain-text email with all those recipients in the To field.