# boolean_smtp_api_debug

> Fires with diagnostic details after an API-mode send attempt, whatever its outcome.

Action · Tier C · Since 1.0.0

The admin test-email tool and the debug logger capture this payload; it is not a stable contract and may change between releases.

## Signature

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

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$debug` | `array<string, mixed>` | Diagnostic data: `provider` (`google`, `outlook`, `ses`), `delivery_mode`, `error_code`, `error_message` and `error_data` (the last three `null` on success), plus the provider's own auth or response details. |

## Fires in

- [app/Services/Mailer/ApiMailDispatcher.php:183](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Mailer/ApiMailDispatcher.php#L183) — `BooleanSmtp\Services\Mailer\ApiMailDispatcher::maybeHandle()`

## Example

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