Skip to content

boolean_smtp_mail_before_log

Fires before an outgoing message is offered to the email log.

action Tier B Since 1.0.0

The message may still be kept out of the log by the source exclusions or by `boolean_smtp_should_log_email`; `boolean_smtp_mail_attempt_recorded` fires only when a row was written.

Signature

add_action( 'boolean_smtp_mail_before_log', $callback, 10, 2 );

Parameters

ParameterTypeDescription
$phpmailer\PHPMailer\PHPMailer\PHPMailerMailer instance about to be logged.
$connection\BooleanSmtp\Models\ConnectionConnection the message is being sent through.

Fires in

Example

boolean_smtp_mail_before_log.php
add_action( 'boolean_smtp_mail_before_log', function ( \PHPMailer\PHPMailer\PHPMailer $phpmailer, \BooleanSmtp\Models\Connection $connection ) {
// React to the event.
}, 10, 2 );

Next steps