I recently had a notification error that caused the notification to not send.
WordPress was unable to send the notification email. Cannot send email because the TO address is invalid.
I fixed the underlying issue but was only made aware of the error because a user wondered why they didn’t get the email. Is there a way to send myself or someone else an email to alert us to these errors?
There is the gform_send_email_failed action that triggers when a notification fails to send. You could use that hook to trigger a basic email alert using something like wp_mail() in the callback function.
That’s a great hook to tie into @karlpotter. If the cause of the email failure was network/server rather than user data entry, using wp_mail might lead to the same delivery issue for the alert though
@user5b9a6031249674.5 - Building on that filter idea, a few options you could consider to increase the reliability of the delivery failure process hooked in there:
Use GFAPI::update_entry_field to update a field (or meta value) to indicate the delivery failed. Then have to build a report to track notification failures for follow-up or re-send.
Same as above, but instead of building a separate report, leverage the Gravity Flow inbox (block/shortcode) for the list of entries for your staff to review/action. You would add a Gravity Flow step that evaluates the delivery-check field. In this way you might use an Approval step for staff to check the root cause for delivery failure and correct action to take (re-send, modify email address via user input step then resend, etc.).
I just replied to a community thread about notification delivery failures due to conditional logic that might give you a few more ideas towards that.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.