Skip to content

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

ParameterTypeDescription
$should_notifyboolWhether to announce the failure. Default `true`.
$contextarray<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

Example

boolean_smtp_should_notify_delivery_failure.php
add_filter( 'boolean_smtp_should_notify_delivery_failure', function ( bool $should_notify, array $context ) {
return $should_notify;
}, 10, 2 );

Next steps