# boolean_smtp_mail_connection_resolved

> Fires after a connection has been resolved for an outgoing message, before it is applied to PHPMailer.

Action · Tier A · Since 1.0.0



## Signature

```php
add_action( 'boolean_smtp_mail_connection_resolved', $callback, 10, 2 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$connection` | `\BooleanSmtp\Models\Connection` | Connection resolved for this send. |
| `$emailData` | `array<string, mixed>` | Routing data (to, subject, from, content_type). |

## Fires in

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

## Example

```php
add_action( 'boolean_smtp_mail_connection_resolved', function ( \BooleanSmtp\Models\Connection $connection, array $emailData ) {
    // React to the event.
}, 10, 2 );
```
