# 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

```php
add_filter( 'boolean_smtp_should_notify_delivery_failure', $callback, 10, 2 );
```

## Parameters

| Name | 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](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Mailer/EmailDeliveryFailureNotifier.php#L71) — `BooleanSmtp\Services\Mailer\EmailDeliveryFailureNotifier::notifyFinal()`
- [app/Services/Mailer/EmailDeliveryFailureNotifier.php:134](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Mailer/EmailDeliveryFailureNotifier.php#L134) — `BooleanSmtp\Services\Mailer\EmailDeliveryFailureNotifier::notifyFinalFromQueueLog()`

## Example

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