formcierge_before_send_email
Action
Since v1.0.0
Fires immediately before a notification email is sent. You can use this hook for logging, auditing, or conditionally blocking email sending by removing the default mailer action.
Parameters
$to
string
Recipient email address or comma-separated list.
$subject
string
Email subject line.
$message
string
Email body (HTML or plain text).
$form_id
int
The ID of the form that triggered this email.
includes/Core/Mailer.php
Basic Usage
add_action( 'formcierge_before_send_email', function ( $to, $subject, $message, $form_id ) {
error_log( "[Formcierge] Sending email to $to — Subject: $subject" );
}, 10, 4 );