Skip to content

boolean_smtp_max_retry_attempts

Filters how many times a failed message is retried on other connections.

filter Tier A Since 1.0.0

Applies when "Retry on other connections" is on: after the first failed send the queue worker retries the message on the active connections it has not tried yet, one per attempt, up to this many times. The add-on's "Maximum Attempts" setting is delivered through this filter. Return `0` to disable retries without turning the setting off.

Signature

add_filter( 'boolean_smtp_max_retry_attempts', $callback, 10, 1 );

Parameters

ParameterTypeDescription
$attemptsintRetries after the first failed send. Default `2`.

Returns int — Retries after the first failed send.

Fires in

Example

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

Next steps