<?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: Notify visitor that their post was published</title>
		<link>https://legacy.forums.gravityhelp.com/topic/notify-visitor-that-their-post-was-published</link>
		<description>Gravity Support Forums Topic: Notify visitor that their post was published</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 05:03:04 +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/notify-visitor-that-their-post-was-published" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Notify visitor that their post was published"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/notify-visitor-that-their-post-was-published#post-32750</link>
			<pubDate>Wed, 17 Aug 2011 14:07:20 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">32750@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Did you use YOUR_CUSTOMFIELD_KEY literally, or change it to the name of the custom field, something like &#34;visitor_email&#34;?  You should change this YOUR_CUSTOMFIELD_KEY to whatever custom field name you're using to store the visitor email.&#60;/p&#62;
&#60;p&#62;You need to change the name and email too.&#60;/p&#62;
&#60;p&#62;Also, did you add this code the your theme's functions.php?&#60;/p&#62;
&#60;p&#62;There is no need to send the post ID.  It is passed automatically when the post is published.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nicole on "Notify visitor that their post was published"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/notify-visitor-that-their-post-was-published#post-32718</link>
			<pubDate>Wed, 17 Aug 2011 08:25:05 +0000</pubDate>
			<dc:creator>nicole</dc:creator>
			<guid isPermaLink="false">32718@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I found this code on this forum in order to notify readers that their submission has been published:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function email_members($post_ID)  {
	global $post;
	$email_to = get_post_meta($post-&#38;gt;ID, &#38;#39;YOUR_CUSTOMFIELD_KEY&#38;#39;, true);
	$headers = &#38;#39;From: Name &#38;lt;name@name.com&#38;gt;&#38;#39; . \\&#38;quot;\r\n\\&#38;quot;;
        $subject = &#38;quot;Your subject here&#38;quot;;
	$message = &#38;quot;Your message here&#38;quot;;
    wp_mail($email_to, $subject, $message, $headers);
    return $post_ID;
}

add_action(&#38;#39;publish_post&#38;#39;, &#38;#39;email_members&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The problem is I am not sure how to use it.  This is what I did:&#60;br /&#62;
1) I put &#34;YOUR_CUSTOMFIELD_KEY&#34; in the admin label of the email field.&#60;br /&#62;
2) I replaced Your subject here - with my subject and Your message here with my message.&#60;/p&#62;
&#60;p&#62;It still doesn't work. Should I put the post ID somewhere? If so, where? Anything else that I should do to get it to work?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
