---
title: email.failed
description: The mail provider refused the message before any delivery attempt.
sidebar:
  label: email.failed
  icon: circle-x
---

The mail provider refused the message before any delivery attempt — a virus verdict, a policy, a rendering failure. Nothing reached any recipient, and nothing will be retried: the message is `failed`.

## Payload

| Prop | Type | Default | Description |
| - | - | - | - |
| `email_id` | `string` | - | eml_… |
| `thread_id` | `string` | - | The conversation. |
| `domain_id` | `string \| null` | - | The domain it was sent from, or null when sent through a mailbox. |
| `mailbox_id` | `string \| null` | - | The mailbox it was sent through, or null when sent from a domain. |
| `suppression_key` | `string \| null` | - | The list the send named, when it named one. |
| `reason` | `string` | - | What the provider said. |

## Handling it

```ts
if (event.type === "email.failed") {
  await flagForReview(event.data.email_id, event.data.reason)
}
```

A refusal is about the message, not the address: no suppression is written, and the same recipient can be written to again once the content is fixed.
