Description
The gform_mailgun_send_email_failed action hook is triggerd when MailGun API reports it is unable to send the email.
Usage
add_action( 'gform_mailgun_send_email_failed', 'my_function', 10, 6 );
Parameters
- $error_message string
The error message returned by the API.
-
$mailgun_email array
The Mailgun email arguments.
-
$email array
The original email details.
-
$message_format string
The message format, html or text.
-
$notification array
An array of properties which make up a notification object. See Notifications Object for possible properties.
-
$entry array
The entry object.
Examples
function my_function( $error_message, $mailgun_email, $email, $message_format, $notification, $entry ) { //Do something here } add_action( 'gform_mailgun_send_email_failed', 'my_function', 10, 6 );
Placement
This code should be placed in the functions.php file of your active theme or a custom functions plugin.
Since
This filter was added in Mailgun version 1.2.
Source Code
This filter is located in class-gf-mailgun.php.