---
title: Send Email from an Approval Step
slug: send-email-from-an-approval-step
createdAt: 2026-01-27T22:07:45.593Z
---

:::hint{type="warning"}
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.

:::BlockQuote
\<?xml version="1.0" encoding="utf-16"?>
\<WebForm>
&#x20; \<Panel Width="100%">
&#x20;   \<Controls>
&#x20;     \<MenuButton Text="Send Email"
&#x20;                 Link="=//Job/Task/SendUpdateEmailWizard"
&#x20;                 ImageUrl="../images/add.gif" />
&#x20;   \</Controls>
&#x20; \</Panel>
\</WebForm>
:::

# 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.

:::BlockQuote
\<WebForm>
&#x20; \<Panel Width="100%" Form.Load="Form\_Load" Form.Submit="Form\_Submit">
&#x20;   \<Controls>
&#x20;     \<RibbonPanel>
&#x20;       \<Controls>
&#x20;         \<RibbonGroup Text="Email">
&#x20;           \<Controls>
&#x20;             \<RibbonButton Link="/" Click="OnSend" Text="Send" ImageUrl="../images/mail\_forward32.png" />
&#x20;           \</Controls>
&#x20;         \</RibbonGroup>
&#x20;       \</Controls>
&#x20;     \</RibbonPanel>

&#x20;     \<TextBox ID="txtEmail" Label="Email Address" Width="800px" Text="=/user/emailaddress" />
&#x20;     \<TextBox ID="txtSubject" Label="Subject" Width="800px" Text="=eval(=//Job, \\"%=//Job/services/instance/0/service/OrderFrom/ResponseEmail/Subject%\\")" />
&#x20;     \<HTMLEditor ID="txtBody" Label="Message" Width="800px" Html="=eval(=//Job, \\"%=//Job/services/instance/0/service/OrderFrom/ResponseEmail/Body%\\")" />
&#x20;   \</Controls>
&#x20; \</Panel>
\</WebForm>
:::

# 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.

:::BlockQuote
using System;
using Innovation.Activate;
using Innovation.Activate.Utilities;
using Innovation.Activate.Web;
using Innovation.Activate.Web.Controls;

class Script : WebFormScript
\{
&#x20;   public void OnSend(object sender, MenuLinkClickEventArgs a)
&#x20;   \{
&#x20;       TextBox txtEmail = (TextBox)GetControl("txtEmail");
&#x20;       TextBox txtSubject = (TextBox)GetControl("txtSubject");
&#x20;       HTMLEditor txtBody = (HTMLEditor)GetControl("txtBody");

&#x20;       MailUtilities.SendEmail(txtEmail.Text, txtSubject.Text, txtBody.Html);
&#x20;       WebUtils.GotoReturnPage();
&#x20;   }
}
:::

# 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

