Description
Fires when an email fails to send through Gravity SMTP. The gravitysmtp_on_send_failure
action allows you to perform custom code when email sending fails.
Usage
add_action( 'gravitysmtp_on_send_failure', 'your_function_name', 10, 1 );
Parameters
Parameter | Type | Description |
---|---|---|
$email_id | int | The ID of the failed email event. |
Examples
Perform custom action when email send fails.
add_action( 'gravitysmtp_on_send_failure', function( $email_id ) {
// Do something when a message fails to send from Gravity SMTP.
} );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This action is located in includes/handler/class-handler-service-provider.php