# boolean_smtp_before_send

> Fires immediately before a message is sent, after the connection and transport have been configured.

Action · Tier A · Since 1.0.0



## Signature

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

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$data` | `array{to: string, subject: string, connection: array{id: int, driver: string}}` | Message and connection details for the send about to happen. |

## Fires in

- [app/Services/Mailer/MailerManager.php:270](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Mailer/MailerManager.php#L270) — `BooleanSmtp\Services\Mailer\MailerManager::configure()`

## Example

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