<?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: Automatic/Programmatic Email Routing in functions.php?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp</link>
		<description>Gravity Support Forums Topic: Automatic/Programmatic Email Routing in functions.php?</description>
		<language>en-US</language>
		<pubDate>Fri, 24 Apr 2026 12:57:50 +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/automaticprogrammatic-email-routing-in-functionsphp" rel="self" type="application/rss+xml" />

		<item>
			<title>Idealien on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-20857</link>
			<pubDate>Sat, 19 Mar 2011 14:02:30 +0000</pubDate>
			<dc:creator>Idealien</dc:creator>
			<guid isPermaLink="false">20857@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Solved.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_filter(&#38;quot;gform_pre_submission_filter&#38;quot;, &#38;quot;add_replyto&#38;quot;);
function add_replyto($form){

    //Change numbers to your actual form id
    if($form[&#38;quot;id&#38;quot;] != 2)
        return $form;

    //Change input_2 with your actual input names
    //Change &#60;a href=&#34;mailto:mymail@example.com&#34;&#62;mymail@example.com&#60;/a&#62; to your actual emailaddress
    $form[&#38;quot;notification&#38;quot;][&#38;quot;to&#38;quot;] = $_POST[&#38;quot;input_5&#38;quot;];
	//print_r($form[&#38;quot;notification&#38;quot;]);
    return $form;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Idealien on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-20854</link>
			<pubDate>Sat, 19 Mar 2011 13:11:30 +0000</pubDate>
			<dc:creator>Idealien</dc:creator>
			<guid isPermaLink="false">20854@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've got a related question where the solution splashpress is looking for would be valuable. Via other forum threads I have the drop-down displaying name and value as email for people to contact which is being pulled from entries in a custom post type.&#60;/p&#62;
&#60;p&#62;The alternate option - user in admin tweaking the notifications, is beyond the complexity of the user base I'm designing for. And from their perspective, add / remove an entry in the staff list should make the contact form auto-update. The display of name / email is, but the automation of routing is the missing piece of the puzzle.&#60;/p&#62;
&#60;p&#62;Thx,&#60;br /&#62;
Jamie
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-7040</link>
			<pubDate>Tue, 06 Jul 2010 10:49:10 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">7040@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@splashpress The user COULD see all the notifications settings displayed in the WP admin.  He would go to the Notifications page for that form and he could see the email to select mapping and change/update them.  It wouldn't be hidden behind code.  It's visible and configurable from the Notifications page for that Form in the Gravity Forms admin.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>splashpress on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-7025</link>
			<pubDate>Mon, 05 Jul 2010 23:50:52 +0000</pubDate>
			<dc:creator>splashpress</dc:creator>
			<guid isPermaLink="false">7025@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@Carl: Yes, I get that I'd have to enter stuff either way but it would be more useful to the client if he can see all those notification settings displayed in the WP admin.&#60;/p&#62;
&#60;p&#62;@David: Thanks for the suggestion, but there doesn't seem to be a link in the &#34;instructions here&#34; text.&#60;/p&#62;
&#60;p&#62;So a list of options I could do:&#60;/p&#62;
&#60;p&#62;1. Do the routing in code&#60;br /&#62;
2. Send notification to a form field which contains an email address&#60;br /&#62;
3. Enter the routing conditions one by one in the admin&#60;/p&#62;
&#60;p&#62;#2 would be really great if there were a way to tie dropdown menu values to email addresses automatically, like:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;option value=&#38;quot;johndoe@gmail.com&#38;quot;&#38;gt;John Doe&#38;lt;/option&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Or:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;option value=&#38;quot;John Doe&#38;quot;&#38;gt;John Doe&#38;lt;/option&#38;gt;&#60;/code&#62; &#60;/p&#62;
&#60;p&#62;updates another form field automatically using JavaScript.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-6958</link>
			<pubDate>Fri, 02 Jul 2010 15:32:24 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">6958@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Splash,&#60;/p&#62;
&#60;p&#62;I'm not 100% sure what you're looking for, but you can use the &#34;gform_pre_submission_filter&#34; filter to customize the form itself. This means you can update the notification properties of the form and write a conditional that will do all the manual labor for you.&#60;/p&#62;
&#60;p&#62;To see what you have to work with, I'd recommend setting up a filter (&#60;a rel=&#34;nofollow&#34;&#62;instructions here&#60;/a&#62;) and just using php's &#60;a href=&#34;http://php.net/manual/en/function.print-r.php&#34; rel=&#34;nofollow&#34;&#62;print_r&#60;/a&#62; function to output the contents of the $form variable which is passed to the filter.&#60;/p&#62;
&#60;p&#62;If you have any more specific questions, feel free to hit me on my email: &#60;a href=&#34;mailto:david@ounceoftalent.com&#34;&#62;david@ounceoftalent.com&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-6898</link>
			<pubDate>Thu, 01 Jul 2010 10:35:46 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">6898@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The conditions can't be added automatically with the drop down.  They are part of the notification setup.  So regardless if you do it with code or if you use the email notification it would still basically have to be manually entered to know which email goes with which drop down selection.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>splashpress on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-6889</link>
			<pubDate>Thu, 01 Jul 2010 00:17:40 +0000</pubDate>
			<dc:creator>splashpress</dc:creator>
			<guid isPermaLink="false">6889@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;&#34;Setup routing rules for each name in your drop down (basically allows you to Send to &#60;a href=&#34;mailto:john@doe.com&#34;&#62;john@doe.com&#60;/a&#62; if the name drop down = John Doe)&#34;&#60;/p&#62;
&#60;p&#62;See that's what I wanted to eliminate: manually entering those conditions so the client doesn't have to edit that every time he adds a new item to the list, especially if the list is large. I wanted to add all those conditions automatically.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-6887</link>
			<pubDate>Wed, 30 Jun 2010 23:54:34 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">6887@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You use the email routing feature on the Admin Notification for the Send To address.  You use that functionality to map an email address with a drop down selection.&#60;/p&#62;
&#60;p&#62;- Add a drop down to your form that consists of the names the user would select from.&#60;br /&#62;
- Edit the Notifications for that form (select edit forms and then hover over the form and click the Notifications link)&#60;br /&#62;
- Setup the Admin Notification&#60;br /&#62;
- For the Send To email address select the Routing radio button&#60;br /&#62;
- Setup routing rules for each name in your drop down (basically allows you to Send to &#60;a href=&#34;mailto:john@doe.com&#34;&#62;john@doe.com&#60;/a&#62; if the name drop down = John Doe)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>splashpress on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-6884</link>
			<pubDate>Wed, 30 Jun 2010 23:11:52 +0000</pubDate>
			<dc:creator>splashpress</dc:creator>
			<guid isPermaLink="false">6884@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Well yeah, but say I wanted the drop down menu to be a list of names and not email addresses (so it's more readable), how do I apply an email address to a form field when a user selects a name?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Automatic/Programmatic Email Routing in functions.php?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automaticprogrammatic-email-routing-in-functionsphp#post-6854</link>
			<pubDate>Wed, 30 Jun 2010 12:58:01 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">6854@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Why would you route the email to a form field value when you can already use the built in User Notification to send the notification email to a form field value without writing additional code?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
