Skip to content

boolean_smtp_message_body

Filters the message body immediately before it is sent.

filter Tier A Since 1.0.0

Return a modified string to change what is sent.

Signature

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

Parameters

ParameterTypeDescription
$bodystringMessage body (HTML or plain text, depending on content type).
$tostringPrimary recipient address.

Returns string — The filtered body.

Fires in

Example

boolean_smtp_message_body.php
add_filter( 'boolean_smtp_message_body', function ( string $body, string $to ) {
return $body;
}, 10, 2 );

Next steps