<?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: Attaching an ics (event) file with text/Calendar mime type - help?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/attaching-an-ics-event-file-with-textcalendar-mime-type-help</link>
		<description>Gravity Support Forums Topic: Attaching an ics (event) file with text/Calendar mime type - help?</description>
		<language>en-US</language>
		<pubDate>Fri, 24 Apr 2026 01:11:17 +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/attaching-an-ics-event-file-with-textcalendar-mime-type-help" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Attaching an ics (event) file with text/Calendar mime type - help?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/attaching-an-ics-event-file-with-textcalendar-mime-type-help#post-105005</link>
			<pubDate>Thu, 20 Dec 2012 13:46:02 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">105005@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The only option for email notification format in Gravity Forms is HTML or text which can be controlled by the gform_notification_format.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_notification_format&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_notification_format&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;To have complete control over the email notification format, you might have to craft your own notification with the proper Content-type, using phpmailer.   Here is how one person did it:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/send-from-field-on-notification-setting-page-doesnt-work#post-77233&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/send-from-field-on-notification-setting-page-doesnt-work#post-77233&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You could turn off the default admin notification, and use the gform_after_submission hook to send your own notification.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ben Hutchings on "Attaching an ics (event) file with text/Calendar mime type - help?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/attaching-an-ics-event-file-with-textcalendar-mime-type-help#post-104553</link>
			<pubDate>Wed, 19 Dec 2012 13:28:53 +0000</pubDate>
			<dc:creator>Ben Hutchings</dc:creator>
			<guid isPermaLink="false">104553@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I'm tying to attach a .ics file to an admin notification email. I can do this fine in that when the email arrives it has the file attached. However it doesn't behave the same way that an invitation from GCal/Outlook/iCal would, i.e. letting you add the invitation/appointment to your calendar directly from the mail client.&#60;/p&#62;
&#60;p&#62;It looks like the reason is down to the 'Content-Type' in the email. When I send one from GCal/Outlook/iCal that works fine, this is what I see in the bottom of the email source: &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;--[mesage id here]
Content-Type: text/calendar; charset=&#38;quot;utf-8&#38;quot;; method=REQUEST
Content-Transfer-Encoding: base64

[encoded string here]&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;When I attach a file with this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_admin_notification_attachments_4&#38;quot;, &#38;quot;add_attachment&#38;quot;, 10, 3);
function add_attachment($attachments, $lead, $form){
	$doc = &#38;#39;/invite.ics&#38;#39;;
	$upload = wp_upload_dir();
    $upload_path = $upload[&#38;quot;basedir&#38;quot;];
    $attachments = array();
    $attachments[] = $upload_path . $doc;
    return $attachments;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I get this in the email:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;--[mesage id here]
Content-Type: application/octet-stream; name=&#38;quot;invite.ics&#38;quot;
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=&#38;quot;invite.ics&#38;quot;

[encoded string here]&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Any ideas how I can enforce the correct content type so the mail clients know how to handle it?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Ben
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
