BrightLeaf Digital Code Snippet Library

Check out our growing library of code snippets for Gravity Forms!

Eleven of these snippets register their own shortcodes. Every tag and attribute is in our Gravity Forms shortcodes reference. Need a Gravity Forms or GravityView shortcode built for you? Try the free shortcode builder.

Send Error Notification When GF Notification Fails

Goal

Alerts administrators when Gravity Forms fails to send email notifications. Critical for ensuring important notifications (confirmations, alerts, assignments) aren't silently lost. Includes full email details and error message to help diagnose SMTP/email configuration issues.

Configuration

  • Edit the config block below. Installed through GOCSM, these values are fields and survive snippet updates.
  • $to: Add recipient email address in $to variable (currently empty). Defaults to site admin email.

Notes

This snippet only catches notifications that Gravity Forms detected as failed. It does not catch errors that occur during email sending, such as SMTP connection issues, invalid email addresses, or wp_mail() failing.

Install Using Code Snippets

This code is best installed directly on your site using the Code Snippets plugin.

Check Out the Code

Loading...

Code Copied!
Stay Updated On This Snippet

This entry has no reviews.

Discuss or report a problem with this snippet

Post in Snippets & Custom Code with the snippet name and a link to this page.