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
| Parameter | Type | Description |
|---|---|---|
$phpmailer | \PHPMailer\PHPMailer\PHPMailer | Mailer instance about to be logged. |
$connection | \BooleanSmtp\Models\Connection | Connection the message is being sent through. |
Fires in
app/Services/Mailer/MailerManager.php:336—BooleanSmtp\Services\Mailer\MailerManager::configure()
Example
add_action( 'boolean_smtp_mail_before_log', function ( \PHPMailer\PHPMailer\PHPMailer $phpmailer, \BooleanSmtp\Models\Connection $connection ) { // React to the event.}, 10, 2 );Next steps
- Mail pipeline — every hook in this area, in firing order where that applies.
- Hook Explorer — filter and search every hook.