boolean_smtp_resolve_routing_rule_connection
Filters the connection a routing rule resolves for an outgoing message.
filter Tier A Since 1.0.0
Return a connection array with at least an "id" key to route the message to that connection, or null to defer to the next resolution step.
Signature
add_filter( 'boolean_smtp_resolve_routing_rule_connection', $callback, 10, 2 );Parameters
| Parameter | Type | Description |
|---|---|---|
$resolved | array{id: int}|null | Connection data to route to, or null when no rule matched. |
$emailData | array<string, mixed> | Routing data (to, subject, from, content_type). |
Returns array{id: int}|null — The connection to use, or `null` to fall back to the default resolution.
Fires in
app/Services/Mailer/MailerManager.php:967—BooleanSmtp\Services\Mailer\MailerManager::resolveRoutingRuleConnection()
Example
add_filter( 'boolean_smtp_resolve_routing_rule_connection', function ( ?array $resolved, array $emailData ) { return $resolved;}, 10, 2 );Next steps
- Mail pipeline — every hook in this area, in firing order where that applies.
- Hook Explorer — filter and search every hook.