---
title: "send-email macro"
canonical: "https://support.appfire.com/space/CDML/649924039/send-email%20macro"
format: markdown
---
> Macro (aura-html)


## Overview

> Macro (excerpt)
> 
> Send an email

The `send-email` macro is used to send custom email notifications to one or more recipients.

## Where to use it?

Optional.

One or more `send-email` macros can be put in a [trigger macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859133).

## Parameters

| Parameter | Required | Default | Notes |
| --- | --- | --- | --- |
| *macro body* |  |  | The body of the email:<br>- Plain text, or Wiki markup – see [Confluence Wiki Markup](https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup)
- Can use any character set supported by your Confluence server – except some [reserved characters](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859070)
- Supports [Value References](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694302)<br>> 📝 When using the `send-email` macro in a trigger initiated by an expiration event, **page** or **space reference links** (when the page title is set between [ ] to generate a link from it) are not supported. However regular links wiki markup**, **for example, [google|https://google.com] do work. |
| > ℹ️ Complex wiki markup (eg. macros) may not degrade nicely to `text/plain` MIME type. |
| `address` | :info: See below. |  | A list of one or more email addresses to send the email to:<br>- Comma-separated list of email addresses
- Supports [Value References](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694302) (v4.5.2+)<br>> ℹ️ When using more than one email address, recipients do not see other recipients in the received email. [From 7.7.0]<br>> Macro (contentbylabel) |
| `mimetype` |  | `text/html`<br>*Or, if set, users' **[preferred format](https://confluence.atlassian.com/doc/email-notifications-145162.html)**.* | Which email format to send?<br>- `text/html` – force HTML format
- `text/plain` – force plain text format<br>> Macro (contentbylabel) |
| `subject` |  |  | Email subject:<br>- Plain text
- Supports [Value References](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694302)<br>> Macro (contentbylabel) |
| `user` | :info: See below. |  | A list of one or more users to send the email to:<br>- Comma-separated list which can contain:
  - Usernames
  - User groups
- Supports [Value References](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694302)<br>Alternatively, set to `watchers` to email everyone watching the page or blog post associated with the workflow.<br>> Macro (contentbylabel) |
| > ℹ️ Either a user or an address parameter must be specified for the macro. |

## App configuration

| Setting | Where | Notes |
| --- | --- | --- |
| **From Address**<br>**From Name** | - [Mail Servers - Global](https://confluence.atlassian.com/doc/configuring-a-server-for-outgoing-mail-151078.html) | The "From" email address and name are set in > Macro (inline-media-image)

 → General Configuration → Mail Servers. |
| **Notification settings** | - [Notifications - Space Tools](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650119000)
- [Notifications - Global](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649530054) | When using custom emails, check to see if they are duplicating any of the in-built emails sent by the app - if so, you can disable them in the notification settings at either Space or Global level. |
| **Email Any Address** | - [Configuration - Global](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649889951) | If disabled, emails listed in the `address` parameter can only be sent to if they are associated with registered user accounts (those in the `confluence-users` user group). |

## Example

```plaintext
{workflow}
   	{state:Test|approved=Published}
      {approval:Review}
   	{state}
   	{state:Published}
   	{state}
   	{trigger:pageapproved|approval=Review|partial=true}
      {send-email:user=@user@|subject=Document approved}
         Thank you for approving @page@!
      {send-email}
 	{trigger}
	{trigger:statechanged|state=Published}
      {send-email:user=watchers|subject=Document Published}
          @page@ was published! See what's new!
      {send-email}
   	{trigger}
{workflow}

```

## Related examples

> Macro (contentbylabel)

## See also

[Workflow Authoring Guide](https://appfire.atlassian.net/wiki/spaces/CDML/pages/648611901)

- [Notifications](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649957056)
- [Events](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649759655)
- [Triggers](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649563178)
- [Actions](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649858941)