boolean_smtp_resolve_connection
Filters the connection resolved for an outgoing message, after routing rules and sender matching have run.
filter Tier A Since 1.0.0
Return a connection array with a different "id" to redirect the send to that connection.
Signature
add_filter( 'boolean_smtp_resolve_connection', $callback, 10, 2 );Parameters
| Parameter | Type | Description |
|---|---|---|
$connectionArray | array<string, mixed> | Resolved connection, from {@see Connection::toArray()}. |
$emailData | array<string, mixed> | Routing data (to, subject, from, content_type). |
Returns array<string, mixed> — The filtered connection data.
Fires in
app/Services/Mailer/MailerManager.php:1097—BooleanSmtp\Services\Mailer\MailerManager::applyResolveConnectionFilter()
Example
add_filter( 'boolean_smtp_resolve_connection', function ( array $connectionArray, array $emailData ) { return $connectionArray;}, 10, 2 );Next steps
- Mail pipeline — every hook in this area, in firing order where that applies.
- Hook Explorer — filter and search every hook.