# Mail Forwarding

On staging and other non-production environments, mail forwarding redirects every outgoing email to a single inbox. This lets you test flows that send mail — magic links, receipts, notifications — against real addresses without the risk of emailing actual members.

Never runs in production

Mail forwarding is ignored entirely in production. Enabling it has no effect on a production instance, so outgoing mail is always delivered normally there.

## Configuration[​](#configuration "Direct link to Configuration")

Open **Global Settings → Mail** (super-admin only) to configure forwarding:

| Field                         | Description                                                                                                  |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------ |
| **Forward all outgoing mail** | When enabled, every outgoing email is redirected to the forward address below.                               |
| **Forward to**                | The single inbox that captured mail is sent to (for example, a shared QA inbox or a Slack inbound address).  |
| **Bypass addresses**          | One email per line. Messages addressed only to these recipients are delivered normally instead of forwarded. |

Save the page to apply the changes.

## How forwarding works[​](#how-forwarding-works "Direct link to How forwarding works")

When forwarding is enabled on a non-production environment, each outgoing message is checked against the bypass list:

* If **every** recipient (To, Cc, and Bcc) matches a bypass entry, the message is delivered untouched.
* Otherwise the whole message is redirected to the forward address, and its Cc and Bcc recipients are cleared. The original recipients are preserved in an `X-Original-To` header so you can see who the mail was meant for.

## Bypass matching[​](#bypass-matching "Direct link to Bypass matching")

Bypass entries can be literal addresses or `*` wildcard patterns:

```text
qa@example.com
*@example.com
qa-*@example.com

```

Both the message recipients and the bypass entries are normalized before they are compared — addresses are lowercased and `+` sub-address tags are stripped (so `jane+test@example.com` matches a bypass entry of `jane@example.com`).
