boolean_smtp_should_notify_delivery_failure
Filters whether a final delivery failure is announced and notified.
filter Tier A Since 1.0.0
Return `false` to suppress both the `boolean_smtp_email_delivery_failed_final` action and the alert channels for this event.
Signature
add_filter( 'boolean_smtp_should_notify_delivery_failure', $callback, 10, 2 );Parameters
| Parameter | Type | Description |
|---|---|---|
$should_notify | bool | Whether to announce the failure. Default `true`. |
$context | array<string, mixed> | The `failed_final` context of `boolean_smtp_email_event_data` (`log`, `wp_error`, `source`) plus the filtered event data under `data`. |
Returns bool — Whether to announce the failure.
Fires in
app/Services/Mailer/EmailDeliveryFailureNotifier.php:71—BooleanSmtp\Services\Mailer\EmailDeliveryFailureNotifier::notifyFinal()app/Services/Mailer/EmailDeliveryFailureNotifier.php:134—BooleanSmtp\Services\Mailer\EmailDeliveryFailureNotifier::notifyFinalFromQueueLog()
Example
add_filter( 'boolean_smtp_should_notify_delivery_failure', function ( bool $should_notify, array $context ) { return $should_notify;}, 10, 2 );Next steps
- Delivery lifecycle — every hook in this area, in firing order where that applies.
- Hook Explorer — filter and search every hook.