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
Parameter | Type | Description | Default |
---|---|---|---|
$created_id | int | The ID of the newly created suppression record. | The database record ID |
string | The email address that was suppressed. | The email address | |
$reason | string | The reason for suppression (e.g., ‘bounce’, ‘complaint’, etc.). | The suppression reason |
$notes | string | Any 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