Send Email from an Approval Step
This document applies to Activate V7 and earlier.
This document describes how to send an email update directly from an Approval step in Activate. The example demonstrates triggering an email from an approval button, but the same pattern can be adapted for use with a standard form button.
Overview
Activate supports sending email notifications as part of an approval workflow. By attaching a custom form and server-side script to an approval step, approvers can manually trigger an email update without leaving the approval context.
This approach is commonly used to:
- Send contextual updates to end users during an approval
- Allow approvers to customise the email subject and body before sending
- Reuse existing service response email templates
High-level Flow
The solution is implemented using the following components:
- An approval step with a custom update form
- A web form containing a Send Email button
- A server-side script that sends the email and returns the user to the approval
Approval Button Configuration
The approval step references a custom update form that exposes a Send Email action. The button links to a task wizard that launches the email form.
Email Form
The email form allows the approver to review and modify the recipient, subject, and message body before sending. Default values are populated from the requesting user and service response email configuration.
Server-side Script
The server-side script retrieves the form values and sends the email using the built-in mail utility. After sending, the user is returned to the previous page.
Notes and Considerations
- The same approach can be adapted for non-approval forms by replacing the approval update form with a standard form button
- Ensure SMTP configuration is correctly set up in Activate for email delivery
- Access to send emails is controlled by the approval context and user permissions