boolean_smtp_log_retention_days
Filters the number of days email logs are kept before the daily cleanup removes them.
filter Tier A Since 1.0.0
The value comes from the Settings screen (7 days to 1 year, default 30). Return `0` to keep logs forever, or any number of days the screen does not offer.
Signature
add_filter( 'boolean_smtp_log_retention_days', $callback, 10, 1 );Parameters
| Parameter | Type | Description |
|---|---|---|
$days | int | Days to keep email logs. `0` disables pruning. |
Returns int — Days to keep email logs.
Fires in
app/Jobs/PruneLogsJob.php:93—BooleanSmtp\Jobs\PruneLogsJob::handle()
Example
add_filter( 'boolean_smtp_log_retention_days', function ( int $days ) { return $days;}, 10, 1 );Next steps
- Delivery lifecycle — every hook in this area, in firing order where that applies.
- Hook Explorer — filter and search every hook.