# boolean_smtp_email_sent

> Fires after a message has been delivered successfully.

Action · Tier A · Since 1.0.0

Fired for direct sends and for queued sends alike, after the email log entry has been marked delivered; the payload has passed through `boolean_smtp_email_event_data`.

## Signature

```php
add_action( 'boolean_smtp_email_sent', $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;`subject` | `string` | Subject line. |
| &nbsp;&nbsp;`status` | `string` | Always `delivered`. |
| &nbsp;&nbsp;`provider` | `string` | Provider of the connection that delivered the message. |
| &nbsp;&nbsp;`timestamp` | `int` | Unix timestamp of the delivery. |
| &nbsp;&nbsp;`log_id` | `int` | Id of the email log entry (same as `id`). |
| &nbsp;&nbsp;`connection_id` | `int|null` | Id of the connection used, `null` when unknown. |

## Fires in

- [app/Jobs/ProcessQueueJob.php:289](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Jobs/ProcessQueueJob.php#L289) — `BooleanSmtp\Jobs\ProcessQueueJob::handle()`
- [app/Services/Mailer/EmailLogSendLifecycle.php:155](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Mailer/EmailLogSendLifecycle.php#L155) — `BooleanSmtp\Services\Mailer\EmailLogSendLifecycle::onWpMailSucceeded()`

## Example

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