Skip to content

boolean_smtp_email_headers

Filters the custom headers collected from PHPMailer before the message is logged.

filter Tier A Since 1.0.0

Return a modified array to change what is recorded.

Signature

add_filter( 'boolean_smtp_email_headers', $callback, 10, 2 );

Parameters

ParameterTypeDescription
$headersarray<string, string>Custom header name/value pairs collected from PHPMailer.
$tostringPrimary recipient address.

Returns array<string, string> — The filtered headers.

Fires in

Example

boolean_smtp_email_headers.php
add_filter( 'boolean_smtp_email_headers', function ( array $headers, string $to ) {
return $headers;
}, 10, 2 );

Next steps