<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Emergent Properties &#187; Email</title>
	<atom:link href="http://emergent.urbanpug.com/?cat=17&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://emergent.urbanpug.com</link>
	<description>Order from disorder - Thoughts about where technology is going.</description>
	<lastBuildDate>Wed, 28 Jan 2009 19:27:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>HTML Email with Text Plain Backup.  Notes for MIME::Lite and PHP Pear</title>
		<link>http://emergent.urbanpug.com/?p=84</link>
		<comments>http://emergent.urbanpug.com/?p=84#comments</comments>
		<pubDate>Sun, 25 Feb 2007 17:21:36 +0000</pubDate>
		<dc:creator><![CDATA[matt]]></dc:creator>
				<category><![CDATA[Email]]></category>

		<guid isPermaLink="false">http://emergent.urbanpug.com/?p=84</guid>
		<description><![CDATA[Recently I&#8217;ve been working on some code that needed to have HTML email sent along with plain text email.&#160; One application was the &#8220;email a photo&#8221; option for Resizr.com.&#160; The other option, and the one where it wasn&#8217;t working right, was for PostOnce.net, basically a trucking logistics company.&#160; The trucking industry isn&#8217;t the most high &#8230; <a href="http://emergent.urbanpug.com/?p=84" class="more-link">Continue reading <span class="screen-reader-text">HTML Email with Text Plain Backup.  Notes for MIME::Lite and PHP Pear</span></a>]]></description>
				<content:encoded><![CDATA[<p>Recently I&#8217;ve been working on some code that needed to have HTML email sent along with plain text email.&nbsp; One application was the &#8220;email a photo&#8221; option for <a href="http://www.resizr.com">Resizr.com</a>.&nbsp; The other option, and the one where it wasn&#8217;t working right, was for <a href="http://www.postonce.net">PostOnce.net</a>, basically a trucking logistics company.&nbsp; The trucking industry isn&#8217;t the most high tech, and there are still people out there using email clients that don&#8217;t support HTML.</p>
<p>Anyway, here we go.</p>
<p>With PHP Pear, the code is smart enough to figure things out itself.&nbsp; However, with MIME::Lite, you have to build the message yourself.</p>
<p>The answer to the problem is to use the &#8220;Multipart/Alternative&#8221; as your mime type, put the text/plain part first (for AOL support), and don&#8217;t attach the HTML as a file (attach it as data).</p>
<p>Example:<br />
<blockquote>my $mime_msg = MIME::Lite-&gt;new(<br />&nbsp;&nbsp;&nbsp; From =&gt; &#8220;matt@urbanpug.com&#8221;,<br />&nbsp;&nbsp;&nbsp; To&nbsp;&nbsp; =&gt; $email,<br />&nbsp;&nbsp;&nbsp; Subject =&gt; &#8216;multipart/alternative&#8217;,<br />&nbsp;&nbsp;&nbsp; Type =&gt; $mime_type,<br />) or die &#8220;Error creating MIME body: $!\n&#8221;;</p>
<p>$mime_msg-&gt;attach(Type =&gt; &#8216;text/plain&#8217;,<br />&nbsp;&nbsp;&nbsp; Data =&gt; qq{ Your Message Body });</p>
<p>$mime_msg-&gt;attach(Type =&gt; &#8216;text/html&#8217;,<br />
&nbsp;&nbsp;&nbsp; Data =&gt; qq{ Your HTML Message Body });</p></blockquote>
<p>However, I had a problem.&nbsp; I was calling various scripts to build a big HTML file, which would then be attached, so i was doing:<br />
<blockquote>$mime_msg-&gt;attach(Type =&gt; &#8216;text/html&#8217;,<br />&nbsp;&nbsp;&nbsp; File =&gt; $html_file_path);</p></blockquote>
<p>Don&#8217;t do that.&nbsp; Instead, read the file into an array, then join the array into a string.&nbsp; I dont know why, but some mail readers (including gmail) saw that the HTML attached was a file, and treated it as an attachment, rather than an alternative way of presenting the same message.</p>
<p>Hope this helps you!&nbsp; If you have anything to add, reply!</p>
]]></content:encoded>
			<wfw:commentRss>http://emergent.urbanpug.com/?feed=rss2&#038;p=84</wfw:commentRss>
		<slash:comments>-255</slash:comments>
		</item>
		<item>
		<title>All powerful email client of the future incorporating current memes</title>
		<link>http://emergent.urbanpug.com/?p=23</link>
		<comments>http://emergent.urbanpug.com/?p=23#comments</comments>
		<pubDate>Tue, 24 May 2005 20:01:34 +0000</pubDate>
		<dc:creator><![CDATA[matt]]></dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Tagging]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://emergent.urbanpug.com/?p=23</guid>
		<description><![CDATA[Ok, big enough title? Simple idea. I think it would be interesting for there to be an emai -> todo list convergence app, with the following features. Let all email be tagged both automatically (text scan) and by hand Allow easy manual tagging (possibly w/ tree-based tag finding) Allow filters that will automatically tag mail &#8230; <a href="http://emergent.urbanpug.com/?p=23" class="more-link">Continue reading <span class="screen-reader-text">All powerful email client of the future incorporating current memes</span></a>]]></description>
				<content:encoded><![CDATA[<p>Ok, big enough title? Simple idea.</p>
<p>I think it would be interesting for there to be an emai -> todo list convergence app, with the following features.</p>
<ol>
<li>Let all email be tagged both automatically (text scan) and by hand</li>
<li>Allow easy manual tagging (possibly w/ tree-based tag finding)</li>
<li>Allow filters that will automatically tag mail based on features of the mail (from an individual, from a mailing list, with a subject line, etc.</li>
<li>Allow &#8216;views&#8217; of mail to be created that shows mail based on how the mail is tagged</li>
<li>Allow todo items to be created easily from mail</li>
<li>Allow tags to be associated w/ todo lists and todo list items</li>
</ol>
<ol>
</ol>
<p class="tags">Tags: <a href="http://technorati.com/tag/tagging" title="See the Technorati tag page for 'tagging'." rel="tag">tagging</a>, <a href="http://technorati.com/tag/email" title="See the Technorati tag page for 'email'." rel="tag">email</a>, <a href="http://technorati.com/tag/productivity" title="See the Technorati tag page for 'productivity'." rel="tag">productivity</a>, <a href="http://technorati.com/tag/tag" title="See the Technorati tag page for 'tag'." rel="tag">tag</a>, <a href="http://technorati.com/tag/tags" title="See the Technorati tag page for 'tags'." rel="tag">tags</a></p>]]></content:encoded>
			<wfw:commentRss>http://emergent.urbanpug.com/?feed=rss2&#038;p=23</wfw:commentRss>
		<slash:comments>-22</slash:comments>
		</item>
	</channel>
</rss>
