WordPress action hook

gform_send_email_failed

Fired by 4 WordPress plugins, running on 1,160+ sites between them.

“Fires when an email from Gravity Forms has failed to send”

How to use gform_send_email_failed

It's an action: your callback runs at that point and receives 3 arguments. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'gform_send_email_failed', function( $error, $email, $entry ) {
	// Your code runs here.
}, 10, 3 );

Argument names come from YeeMail's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

4 plugins that fire gform_send_email_failed

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. YeeMail icon YeeMail700+ installs do_action( 'gform_send_email_failed', $error, $email, $entry ) includes-overwrite/gravityforms-common.php:1849
  2. PDF for Gravity Forms + Drag And Drop Template Builder icon PDF for Gravity Forms + Drag And Drop Template Builder400+ installs do_action( 'gform_send_email_failed', $error, $email, $entry ) gravityforms/gfcommon_style.php:1921
  3. Email Customizer for Gravity Forms icon Email Customizer for Gravity Forms50+ installs do_action( 'gform_send_email_failed', $error, $email, $entry ) backend/gfcommon_style.php:1849
  4. Easexport icon Easexport10+ installs do_action( 'gform_send_email_failed', $error, compact('from', 'to', 'bcc', 'reply_to', 'subject', 'message', 'from_name', 'message_format', 'attachments'), $entry ) easexport-gravity-forms-scheduled-entries-export.php:413

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.