Gform notification email

This hook has been deprecated in v. 1.7. Please use gform_notification instead.

Description

This filter is executed before sending the admin notification email. It can be used to route the notification to a different email address

Usage

Applies to all forms

<?php
add_filter("gform_notification_email", "change_notification_email", 10, 2);
?>


Applies to a specific form. In this case, form Id 5

<?php
add_filter("gform_notification_email_5", "change_notification_email", 10, 2);
?>

Parameters

$email

(string) The email address to be filtered.

$entry

(Entry Object) The current entry.

Examples

This example uses the gform_notification_email filter to send the admin notification to a test email address


<?php
add_filter("gform_notification_email", "change_notification_email", 10, 2);
function change_notification_email($email, $entry){
   return "test@test.com";
}
?>

Source Code

This filter is located in form_display.php

Search the Documentation