<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Send notification to more than one email</title>
		<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email</link>
		<description>Gravity Support Forums Topic: Send notification to more than one email</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 04:54:02 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/send-notification-to-more-than-one-email" rel="self" type="application/rss+xml" />

		<item>
			<title>robbennet on "Send notification to more than one email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email#post-19169</link>
			<pubDate>Tue, 22 Feb 2011 13:53:05 +0000</pubDate>
			<dc:creator>robbennet</dc:creator>
			<guid isPermaLink="false">19169@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks Carl.  This works:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;//GForm autoresponder hook
add_filter(&#38;quot;gform_autoresponder_email&#38;quot;, &#38;quot;change_notification_email&#38;quot;, 10, 2);
function change_notification_email($email, $form) {
	$a = $_POST[&#38;quot;input_33&#38;quot;];
	$b = $_POST[&#38;quot;input_39&#38;quot;];
	$c = $_POST[&#38;quot;input_45&#38;quot;];
	$d = $_POST[&#38;quot;input_52&#38;quot;];
	$e = $_POST[&#38;quot;input_58&#38;quot;];

	$value1 = $a;
	$value2 = $a . &#38;quot;,&#38;quot; . $b;
	$value3 = $a . &#38;quot;,&#38;quot; . $b . &#38;quot;,&#38;quot; . $c;
	$value4 = $a . &#38;quot;,&#38;quot; . $b . &#38;quot;,&#38;quot; .$c . &#38;quot;,&#38;quot; . $d;
	$value5 = $a . &#38;quot;,&#38;quot; . $b . &#38;quot;,&#38;quot; .$c . &#38;quot;,&#38;quot; . $d . &#38;quot;,&#38;quot; . $e;

	if (($a != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($b != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($c != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($d != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($e != &#38;quot;&#38;quot;)) {
	return $value5;
	} elseif (($a != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($b != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($c != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($d != &#38;quot;&#38;quot;)) {
	return $value4;
	} elseif (($a != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($b != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($c != &#38;quot;&#38;quot;)) {
	return $value3;
	} elseif (($a != &#38;quot;&#38;quot;) &#38;amp;&#38;amp; ($b != &#38;quot;&#38;quot;)) {
	return $value2;
	} elseif ($a != &#38;quot;&#38;quot;) {
	return $value1;
	} else {
	return $email;
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;But realized it was completely irrelevant because I had the wrong ID in one of the &#60;code&#62;{Email:ID}&#60;/code&#62; fields...which by the way, will kill anything following that field.  So if in the BCC: field you had &#60;code&#62;{Email:1},{Email:2},{Email:3}&#60;/code&#62; and ID_2 was incorrect for some reason, then ID_3 wouldn't be sent to.  Just an FYI.  Thanks guys.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Send notification to more than one email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email#post-19156</link>
			<pubDate>Tue, 22 Feb 2011 12:31:33 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">19156@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Your code probably isn't appending the values, it's most likely only hitting the first switch and doing that one because the switch only runs once. It's not running every field through that switch statement because there is no loop.  An if statement would probably be better in this situation.  Do an if statement instead of a switch, with an if statement for each field and if it's value isn't blank then append the value.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>robbennet on "Send notification to more than one email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email#post-19136</link>
			<pubDate>Mon, 21 Feb 2011 23:34:38 +0000</pubDate>
			<dc:creator>robbennet</dc:creator>
			<guid isPermaLink="false">19136@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This hook is great, but it breaks when there are multiple fields and some of them are empty.  So if I have 5 email fields that are filled in by the user, I want all 5 of those emails addresses to get the autoresponder.  But if the user on fills in 3 of the 5 it all breaks down and none get sent.  So I did a switch/case and tried to check for empty results like this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;//GForm autoresponder hook
add_filter(&#38;quot;gform_autoresponder_email&#38;quot;, &#38;quot;change_notification_email&#38;quot;, 10, 2);
function change_notification_email($email, $form){
	$value = &#38;quot;&#38;quot;;
	switch ($value) {
		case ($_POST[&#38;quot;input_33&#38;quot;] != &#38;quot;&#38;quot;) :
		$value .= $_POST[&#38;quot;input_33&#38;quot;] . &#38;quot;,&#38;quot;;
		break;
		case ($_POST[&#38;quot;input_39&#38;quot;] != &#38;quot;&#38;quot;) :
		$value .= $_POST[&#38;quot;input_39&#38;quot;] . &#38;quot;,&#38;quot;;
		break;
		case ($_POST[&#38;quot;input_42&#38;quot;] != &#38;quot;&#38;quot;) :
		$value .= $_POST[&#38;quot;input_42&#38;quot;] . &#38;quot;,&#38;quot;;
		break;
		case ($_POST[&#38;quot;input_52&#38;quot;] != &#38;quot;&#38;quot;) :
		$value .= $_POST[&#38;quot;input_52&#38;quot;] . &#38;quot;,&#38;quot;;
		break;
		case ($_POST[&#38;quot;input_58&#38;quot;] != &#38;quot;&#38;quot;) :
		$value .= $_POST[&#38;quot;input_58&#38;quot;];
		break;
		default :
		$value = $email;
		break;
	}
	return $value;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;But it's still not working.  Are there any suggestions you can make so that a user doesn't have to fill in all 5 email fields and it will still send to the ones they did fill in?&#60;/p&#62;
&#60;p&#62;Thanks in advance, love the plugin!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Send notification to more than one email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email#post-13533</link>
			<pubDate>Mon, 29 Nov 2010 12:21:10 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">13533@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes, there is a hook to set the TO address for the Admin Notification.  It accepts multiple email addresses separated by commas.  The hook is:&#60;/p&#62;
&#60;p&#62;gform_notification_email&#60;/p&#62;
&#60;p&#62;Example usage:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_filter(&#38;quot;gform_notification_email&#38;quot;, &#38;quot;change_notification_email&#38;quot;, 10, 2);
function change_notification_email($email, $form){
return &#38;quot;test@test.com&#38;quot;;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The User Notification also has it's own hook for setting the TO address.  That hook is:&#60;/p&#62;
&#60;p&#62;gform_autoresponder_email
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sebbizl on "Send notification to more than one email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email#post-13491</link>
			<pubDate>Sun, 28 Nov 2010 13:41:17 +0000</pubDate>
			<dc:creator>sebbizl</dc:creator>
			<guid isPermaLink="false">13491@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I build a website in which each post represent a small company with its contact information and each one have a custom field named &#34;email&#34;. I want to display the form on the category template and after the submission the notification to be sent to all emails of the posts of that specific category.&#60;br /&#62;
Is there any hook for this?&#60;br /&#62;
Thanx
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Send notification to more than one email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email#post-12974</link>
			<pubDate>Fri, 19 Nov 2010 10:53:57 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">12974@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;David,&#60;br /&#62;
The location in functions.php doesn't matter. It should work anywhere in that file.&#60;br /&#62;
I did notice that in your code above your field IDs are still the same as mine. That might be the issue.&#60;br /&#62;
Try replacing&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;//creating email list from fields 14 and 22.
return $_POST[&#38;quot;input_2&#38;quot;] . &#38;quot;,&#38;quot; . $_POST[&#38;quot;input_3&#38;quot;];&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;With&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//creating email list from fields 14 and 22.
return $_POST[&#38;quot;input_14&#38;quot;] . &#38;quot;,&#38;quot; . $_POST[&#38;quot;input_22&#38;quot;];&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>davidpg on "Send notification to more than one email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email#post-12968</link>
			<pubDate>Fri, 19 Nov 2010 08:42:19 +0000</pubDate>
			<dc:creator>davidpg</dc:creator>
			<guid isPermaLink="false">12968@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am trying this solution out but can not get it to work, probably because I have placed the code in the wrong block of the themes functions.php file?&#60;/p&#62;
&#60;p&#62;Based on the solution your provided, I have altered the vairables so that it applies to my form id 12. I have also changed the field id's accordingly. Are there anyother vairables I need to alter and where exactly do I place this code in functions.php file?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_autoresponder_email&#38;quot;, &#38;quot;change_notification_email&#38;quot;, 10, 2);
function change_notification_email($email, $form){

    //applying notification routing to form Id 12
    if($form[&#38;quot;id&#38;quot;] != 12)
        return $email;

    //creating email list from fields 14 and 22.
    return $_POST[&#38;quot;input_2&#38;quot;] . &#38;quot;,&#38;quot; . $_POST[&#38;quot;input_3&#38;quot;];
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Kind Regards,&#60;/p&#62;
&#60;p&#62;David
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Send notification to more than one email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email#post-7674</link>
			<pubDate>Thu, 22 Jul 2010 10:37:36 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">7674@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You will need to use a hook to accomplish what you need. Try the following code snippet. You will need to replace the form Id and the field Ids to match your values.&#60;br /&#62;
Let me know if you have any questions.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_autoresponder_email&#38;quot;, &#38;quot;change_notification_email&#38;quot;, 10, 2);
function change_notification_email($email, $form){

    //applying notification routing to form Id 2
    if($form[&#38;quot;id&#38;quot;] != 2)
        return $email;

    //creating email list from fields 2 and 3.
    return $_POST[&#38;quot;input_2&#38;quot;] . &#38;quot;,&#38;quot; . $_POST[&#38;quot;input_3&#38;quot;];
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>mogmachine on "Send notification to more than one email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/send-notification-to-more-than-one-email#post-7622</link>
			<pubDate>Wed, 21 Jul 2010 02:52:51 +0000</pubDate>
			<dc:creator>mogmachine</dc:creator>
			<guid isPermaLink="false">7622@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am 2 email fields in my form, one is the person you wish to send the information to, the other is the sender (both being dynamic user entered values), ...i want to send a copy of the generated email to both parties however the notification to user only accepts one dynamic field and the notification to admin does not accept a dynamic field.&#60;/p&#62;
&#60;p&#62;I tried inserting the field variable {Email Address:4} in the BCC field of the user notification, but no luck, ...anyone got a solution (sorry could not find in the forums or help).&#60;/p&#62;
&#60;p&#62;Thanks,
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
