<?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: Attach generated PDF to user notification Email</title>
		<link>https://legacy.forums.gravityhelp.com/topic/attach-generated-pdf-to-user-notification-email</link>
		<description>Gravity Support Forums Topic: Attach generated PDF to user notification Email</description>
		<language>en-US</language>
		<pubDate>Fri, 01 May 2026 01:36:09 +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/attach-generated-pdf-to-user-notification-email" rel="self" type="application/rss+xml" />

		<item>
			<title>Rob Harrell on "Attach generated PDF to user notification Email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/attach-generated-pdf-to-user-notification-email#post-71867</link>
			<pubDate>Tue, 21 Aug 2012 10:13:28 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">71867@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Right on, glad to help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>swolf on "Attach generated PDF to user notification Email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/attach-generated-pdf-to-user-notification-email#post-71865</link>
			<pubDate>Tue, 21 Aug 2012 10:11:54 +0000</pubDate>
			<dc:creator>swolf</dc:creator>
			<guid isPermaLink="false">71865@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Works great, thank you!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Attach generated PDF to user notification Email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/attach-generated-pdf-to-user-notification-email#post-71826</link>
			<pubDate>Tue, 21 Aug 2012 08:25:50 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">71826@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Check this out and see if it helps:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/use-pre-selected-file-as-user-notification-attachment#post-53767&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/use-pre-selected-file-as-user-notification-attachment#post-53767&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>swolf on "Attach generated PDF to user notification Email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/attach-generated-pdf-to-user-notification-email#post-71809</link>
			<pubDate>Tue, 21 Aug 2012 04:46:18 +0000</pubDate>
			<dc:creator>swolf</dc:creator>
			<guid isPermaLink="false">71809@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I am using the gform_pre_submission hook to generate a pdf certificate for my forms which is working great. I'm using gform_pre_submission because I am changing the content of one of the fields to the path of the generated file.&#60;/p&#62;
&#60;p&#62;Now I am trying to get this file attached to the user notification email but can't get that to work. I am guessing I have to use the gform_user_notification_attachments hook but don't know how to use it.&#60;/p&#62;
&#60;p&#62;Here is my code for the gform_pre_submission function, $_POST[&#34;input_20&#34;]  contains the path to the file I want to attach:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_pre_submission&#38;quot;, &#38;quot;set_post_content&#38;quot;, 10, 2);

	function set_post_content($form){
	 if ( $_POST[&#38;#39;input_21&#38;#39;] = &#38;#39;Test&#38;#39; and $_POST[&#38;#39;input_2&#38;#39;] &#38;gt; 6 )	{
    $post_url = &#38;#39;pdf_zertifikat_generator.php&#38;#39;;
    $body = array(
        &#38;#39;datum&#38;#39; =&#38;gt; $_POST[&#38;#39;input_11&#38;#39;],
        &#38;#39;quiz_name&#38;#39; =&#38;gt; $_POST[&#38;#39;input_6&#38;#39;],
        &#38;#39;cme&#38;#39; =&#38;gt; $_POST[&#38;#39;input_13&#38;#39;],
        &#38;#39;bp_login&#38;#39; =&#38;gt; $_POST[&#38;#39;input_19&#38;#39;],
        &#38;#39;wp_email&#38;#39; =&#38;gt; $_POST[&#38;#39;input_10&#38;#39;],
		&#38;#39;bp_id&#38;#39; =&#38;gt; $_POST[&#38;#39;input_17&#38;#39;],
		&#38;#39;score&#38;#39; =&#38;gt; $_POST[&#38;#39;input_2&#38;#39;],
		&#38;#39;VNR&#38;#39; =&#38;gt; $_POST[&#38;#39;input_22&#38;#39;]
        ); 

	if ( $_POST[&#38;#39;input_2&#38;#39;]&#38;gt;6 )	{
	$request = new WP_Http();
    $response = $request-&#38;gt;post($post_url, array(&#38;#39;body&#38;#39; =&#38;gt; $body));

	$_POST[&#38;quot;input_20&#38;quot;] = &#38;quot;../pdf/zertifikate/&#38;quot; . $_POST[&#38;#39;input_17&#38;#39;] . &#38;quot;_&#38;quot; . $_POST[&#38;#39;input_22&#38;#39;] . &#38;quot;.pdf&#38;quot;;
	}
	}
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
