<?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: Change Notification {admin_email} for From Address</title>
		<link>https://legacy.forums.gravityhelp.com/topic/change-notification-admin_email-for-from-address</link>
		<description>Gravity Support Forums Topic: Change Notification {admin_email} for From Address</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 06:35:41 +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/change-notification-admin_email-for-from-address" rel="self" type="application/rss+xml" />

		<item>
			<title>Steve Napierski on "Change Notification {admin_email} for From Address"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-notification-admin_email-for-from-address#post-233752</link>
			<pubDate>Thu, 02 May 2013 11:46:12 +0000</pubDate>
			<dc:creator>Steve Napierski</dc:creator>
			<guid isPermaLink="false">233752@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This looks like a pretty good solution to your situation. Kudos!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>magicdust on "Change Notification {admin_email} for From Address"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-notification-admin_email-for-from-address#post-232014</link>
			<pubDate>Wed, 01 May 2013 08:27:52 +0000</pubDate>
			<dc:creator>magicdust</dc:creator>
			<guid isPermaLink="false">232014@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;We set up gravity forms for a lot of our clients, however our normal Wordpress install the client usually uses an editor-level account and we handle the admin account. This is to prevent our often very low-tech clients from doing things that will break their site.&#60;/p&#62;
&#60;p&#62;The problem we're having is that although we do try to tell them not to, they're often leaving the From and To fields in their Notifications as {admin_email}. This is a problem because that email address is our email address, not theirs.&#60;/p&#62;
&#60;p&#62;I've looked up the gform_notification hook, and got it working so that if the notification has the text {admin_email} it replaces it with the email address of their account.&#60;/p&#62;
&#60;p&#62;The problem is that this doesn't seem to work on the From field. Is there a way in Gravity Forms to filter the From email address, so that I can replace it with theirs if they haven't manually changed it in the Form Settings?&#60;/p&#62;
&#60;p&#62;I'll be using 1.7 only from now on, so 1.7 filters are fine.&#60;/p&#62;
&#60;p&#62;My code so far (in a custom plugin for stuff like this):&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function gform_notification_email( $notification, $email, $form) {
	$editor = get_userdata( 2 );
	$notification = str_replace( &#38;#39;{admin_email}&#38;#39;, $editor-&#38;gt;user_email, $notification);
	return $notification;
}

add_filter(&#38;#39;gform_notification&#38;#39;, &#38;#39;gform_notification_email&#38;#39;, 10, 3);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Jacob @ magicdust&#60;/p&#62;
&#60;p&#62;Edit: Sorry, I should note, that simply doing this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$notification[&#38;#39;from&#38;#39;] = $editor-&#38;gt;user_email;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Works just fine. However this will overwrite it even if the user changes it. I'd like to preserve whatever's in there, unless it's {admin_email}. Problem is it looks like that even though {admin_email} is what's in the notification settings, it's not actually included in the $notifications array.&#60;/p&#62;
&#60;p&#62;Edit: Ok, It seems just checking if $notification['from] == '' is working. Is there anything wrong with this approach? Are there any other places the admin email address is used I should watch out for?&#60;/p&#62;
&#60;p&#62;I know I've pretty much solved the problem... already, but I'm not super-confident in my solution. So if there's a better way, I'd love to hear it.&#60;/p&#62;
&#60;p&#62;Cheers!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
