Skip to content

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

ParameterTypeDescription
$daysintDays to keep email logs. `0` disables pruning.

Returns int — Days to keep email logs.

Fires in

Example

boolean_smtp_log_retention_days.php
add_filter( 'boolean_smtp_log_retention_days', function ( int $days ) {
return $days;
}, 10, 1 );

Next steps