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
add_action( 'boolean_smtp_simulation_captured', $callback, 10, 1 );Parameters
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, mixed> | |
id | int | Id of the email log entry. |
to | string | Recipient address(es), comma separated. |
from_email | string | Sender address. |
from_name | string | Sender name. |
subject | string | Subject line. |
body | string | Message body. |
headers | array<string, string> | Message headers. |
captured_at | string | UTC timestamp (`Y-m-d H:i:s`). |
Fires in
app/Services/Simulation/SimulationService.php:134—BooleanSmtp\Services\Simulation\SimulationService::announce()
Example
add_action( 'boolean_smtp_simulation_captured', function ( array $payload ) { // React to the event.}, 10, 1 );Next steps
- Delivery lifecycle — every hook in this area, in firing order where that applies.
- Hook Explorer — filter and search every hook.