Title: Gravity forms bug and temporary solution
Last modified: October 4, 2018

---

# Gravity forms bug and temporary solution

 *  Resolved [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/gravity-forms-bug-and-temporary-solution/)
 * When sending Gravity Forms notifications this plugin checks the $_POST variable
   to determine if it is Gravity Forms that is sending the mail and throws an exception
   if not:
 *     ```
       if( !array_key_exists('gform_submit', $_POST) && !array_key_exists( 'gform_send_resume_link', $_POST) && !array_key_exists( 'gf_resend_notifications', $_POST) )
                   throw new Haet_Different_Plugin_Exception();
       ```
   
 * However, when using the [Gravity Forms API to send notifications](https://docs.gravityforms.com/api-functions/#send-notifications):
 * `GFAPI::send_notifications( $form, $entry );`
 * no such variable is present and therefor the exception is thrown.
 * A temporary workaroud is to set the variable manually before sending the notification:
 *     ```
       $_POST["gform_submit"] = true;
       GFAPI::send_notifications( $form, $entry );
       ```
   
    -  This topic was modified 7 years, 8 months ago by [fried_eggz](https://wordpress.org/support/users/fried_eggz/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Hannes Etzelstorfer](https://wordpress.org/support/users/haet/)
 * (@haet)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/gravity-forms-bug-and-temporary-solution/#post-10749680)
 * Hello,
    I resolved this issue this morning and created a beta using a different
   approach that should also work with gravity flow (another user is testing this
   at the moment). The plugin hooks into the send_notification function now and 
   adds a hidden comment to all gravity emails. The constructor checks for this 
   comment (instead of the POST parameter). Please try the update and post your 
   feedback here: [https://drive.google.com/a/etzelstorfer.com/file/d/1jPboVdp_hrBuZskVBY3TJZcJ5-M1Ir7n/view?usp=sharing](https://drive.google.com/a/etzelstorfer.com/file/d/1jPboVdp_hrBuZskVBY3TJZcJ5-M1Ir7n/view?usp=sharing)
   best regards, Hannes

Viewing 1 replies (of 1 total)

The topic ‘Gravity forms bug and temporary solution’ is closed to new replies.

 * ![](https://ps.w.org/wp-html-mail/assets/icon-256x256.png?rev=1730334)
 * [Email Template Designer - WP HTML Mail](https://wordpress.org/plugins/wp-html-mail/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-html-mail/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-html-mail/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-html-mail/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-html-mail/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-html-mail/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Hannes Etzelstorfer](https://wordpress.org/support/users/haet/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/gravity-forms-bug-and-temporary-solution/#post-10749680)
 * Status: resolved