gravitysmtp_after_email_suppressed

Description

Fires after an email has been successfully suppressed in the Gravity SMTP suppression list. The gravitysmtp_after_email_suppressed action allows you to perform custom logic after adding an email to the suppression database.

Usage

add_action( 'gravitysmtp_after_email_suppressed', 'your_function_name', 10, 4 );

Parameters

ParameterTypeDescriptionDefault
$created_idintThe ID of the newly created suppression record.The database record ID
$emailstringThe email address that was suppressed.The email address
$reasonstringThe reason for suppression (e.g., ‘bounce’, ‘complaint’, etc.).The suppression reason
$notesstringAny additional notes about the suppression.The suppression notes

Examples

Perform a custom action when an email is suppressed.

add_action( 'gravitysmtp_after_email_suppressed', function( $created_id, $email, $reason, $notes ) {
    // do something
}, 10, 4 );

Since

This action was added in Gravity SMTP version 1.5.1.

Source Code

This action is located in includes/handler/class-handler-service-provider.php