---
title: "Action: send an email"
description: "Send an email automatically when an event happens in Guardian."
product: "Guardian"
edition: "Classic"
type: "workflow"
url: "https://docs.cloudhouse.com/guardian/classic/control/events/actions/send-an-email/"
---
# Action: send an email

Send an email automatically when an event happens in Guardian. For example, perhaps you want Guardian to send an email letting you know when a new node is created. You can configure this as an **Action** that automatically sends an email every time a new node is added to your Guardian instance.

Applies to: `Guardian Classic`

![Action sendanemail](https://docs.cloudhouse.com/guardian/classic/assets/images/guardian/control/events/action-sendanemail.png)

!!! tip

    For an overview of actions in Guardian, including more options available to choose from, see [Actions](https://docs.cloudhouse.com/guardian/classic/control/events/actions/actions/index.md).

## Action Settings

When configuring a **Send an Email** action, the following settings are presented:

**Action Name** field
:   A unique name for the action. This name is how you will identify this action among all others configured in your Guardian instance, so ensure it is descriptive. For example, 'New Node Creation Email' and not simply 'Send an Email'.

**To** field
:   The recipients you want to notify when this action is triggered. You can enter multiple, comma-separated email addresses in this field.

**CC** field (optional)
:   The email address(es) you want to be CC'ed when this action is triggered. You can enter multiple, comma-separated email addresses in this field.

**BCC** field (optional)
:   The email address(es) you want to be BCC'ed when this action is triggered. You can enter multiple, comma-separated email addresses in this field.

**Subject** field
:   A subject line for the emails sent by this action. To make your emails dynamic, you can include variables in this field.  Variables are pieces of text that Guardian will replace with relevant data. For example, you could use the variable `{{ node_id }}` to include the ID of the node that's been created in Guardian being added.

**Content Type** drop-down list
:   The format you intend to use in the body of emails for this action. The content of your emails is represented by the **Message** field. **Content Type** options include:

    - HTML - If selected, HTML is supported in the Message field. Any HTML elements you enter in your message will be displayed as such in the resulting emails.
    - Plain Text - If selected, content entered in the Message field will be treated as plain text, meaning HTML elements will not be recognised.

**Message** field
:   The body text to include in emails sent by this action. To make your emails dynamic, you can include variables in this field.  Variables are pieces of text that Guardian will replace with relevant data. For example, you could use the variable `{{ timestamp }}` to include the time that the action was triggered. Or, you could use the variable `{{ node_id }}` here to include the ID of the node that's been created in Guardian.

These settings are configured when adding a new action, and they can also be edited at any time through the **Actions** tab (**Control** > **Events** > **Action**). To edit an action from the **Actions** tab, click the **Ellipsis** (![Ellipses](https://docs.cloudhouse.com/guardian/classic/assets/images/guardian/buttons/ellipses.png)) and select **Edit**. Once you have made your edits, click **Done** to save them.

## Add a send an email action

You can add a new **Send an Email** action from any saved view in your Guardian instance. Each saved view represents a specific event determined using a query on the **Events** page. The saved view you select during this configuration determines the corresponding event that triggers your new action. For more information, see [Saved Views](https://docs.cloudhouse.com/guardian/classic/control/events/events/index.md#saved-views).

To add a Send an Email action, complete the following process:

!!! tip

    For help completing any of the following fields, refer to their respective descriptions in the **Action Settings** table above.

1. Navigate to the **Events** tab (**Control** > **Events**).
2. Click the **Saved Views** button at the top of the page. The **Saved Views** side panel is displayed.

    ![Screenshot showing the Guardian Events page with a border around the Saved Views button.](https://docs.cloudhouse.com/guardian/classic/assets/images/guardian/control/events/add-action-01.png)

3. Select the event you want to trigger your new action. The saved view for that event is displayed.
4. Click the **Actions** tab to display all existing actions configured for this event.
5. Click the **Add Action** button. The **Add New Action** page is displayed.

    ![Screenshot showing the Guardian Events page with a border around the Actions tab and the Add Action button.](https://docs.cloudhouse.com/guardian/classic/assets/images/guardian/control/events/add-action-02.png)

6. Click **Send an Email**. The required fields are displayed.
7. Enter an **Action Name**.
8. Enter the appropriate email address(es) in the **To** field.
9. (Optional) Enter the appropriate email address(es) in the **CC** field.
10. (Optional) Enter the appropriate email address(es) in the **BCC** field.
11. Enter a **Subject**.
12. Select a **Content Type**.
13. Enter a **Message**.

    !!! tip

        Once you have entered a subject and a message, you can view a preview of the email that will be sent as part of this action. You can use this preview to test any variables you may have used in the subject or body of your email. To view a sample email, click **Preview**.

    ![Sendanemail preview](https://docs.cloudhouse.com/guardian/classic/assets/images/guardian/control/events/sendanemail-preview.png)

14. Click **Done**.

Now, a confirmation dialog is displayed and you are redirected to the **Actions** tab for your selected saved view. Here, you can view your new action. To disable, edit, or test the action, click the **Ellipsis** (![Ellipses](https://docs.cloudhouse.com/guardian/classic/assets/images/guardian/buttons/ellipses.png)) and select the appropriate option.
