# boolean_smtp_simulation_captured

> Fires after a message has been captured by Email Simulation Mode instead of being sent.

Action · Tier A · Since 1.0.0

Fired for every captured message, whether it came from `wp_mail()`, the API-mode pipeline or the queue; the payload is the log entry that recorded it.

## Signature

```php
add_action( 'boolean_smtp_simulation_captured', $callback, 10, 1 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$payload` | `array<string, mixed>` |  |
| &nbsp;&nbsp;`id` | `int` | Id of the email log entry. |
| &nbsp;&nbsp;`to` | `string` | Recipient address(es), comma separated. |
| &nbsp;&nbsp;`from_email` | `string` | Sender address. |
| &nbsp;&nbsp;`from_name` | `string` | Sender name. |
| &nbsp;&nbsp;`subject` | `string` | Subject line. |
| &nbsp;&nbsp;`body` | `string` | Message body. |
| &nbsp;&nbsp;`headers` | `array<string, string>` | Message headers. |
| &nbsp;&nbsp;`captured_at` | `string` | UTC timestamp (`Y-m-d H:i:s`). |

## Fires in

- [app/Services/Simulation/SimulationService.php:134](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Simulation/SimulationService.php#L134) — `BooleanSmtp\Services\Simulation\SimulationService::announce()`

## Example

```php
add_action( 'boolean_smtp_simulation_captured', function ( array $payload ) {
    // React to the event.
}, 10, 1 );
```
