<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Sending HTML &amp; TXT Email at the send time</title>
	<atom:link href="http://code.lewro.com/php/sending-html-txt-email-at-the-send-time/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.lewro.com/php/sending-html-txt-email-at-the-send-time/</link>
	<description>Code &#38; Config - sharing the smart bits</description>
	<lastBuildDate>Mon, 29 Aug 2011 01:51:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://code.lewro.com/php/sending-html-txt-email-at-the-send-time/comment-page-1/#comment-23</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 28 Jan 2010 22:33:15 +0000</pubDate>
		<guid isPermaLink="false">http://code.lewro.com/?p=127#comment-23</guid>
		<description>Looks great @Griff. 
Good call with those variables. I put the code together from various sources and that&#039;s where the mixture of variables come from. Let me fix that.</description>
		<content:encoded><![CDATA[<p>Looks great @Griff.<br />
Good call with those variables. I put the code together from various sources and that&#8217;s where the mixture of variables come from. Let me fix that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Griff</title>
		<link>http://code.lewro.com/php/sending-html-txt-email-at-the-send-time/comment-page-1/#comment-22</link>
		<dc:creator>Griff</dc:creator>
		<pubDate>Thu, 28 Jan 2010 22:18:26 +0000</pubDate>
		<guid isPermaLink="false">http://code.lewro.com/?p=127#comment-22</guid>
		<description>Good work! I think this could be made really useful by making it a more general function: something like (I&#039;m just sketching the idea here)

[php]
function send_html_and_text_email( $to, $from, $subject, $htmlContent, $textContent = &quot;&quot;){

// $to could be an array or a single email, the function would be able
// to deal with it using the is_array function

// The text half of the email, if the parameter is empty, could be extracted
// from the html content, by extracting everything between the &lt;body&gt; tags
// with a regex and then running strip_tags on that

}
[/php]

Like I say, it&#039;s just a sketch, but could be a really useful library function :)

Also, one thing I can&#039;t help but note from your code is the mix of Camel Case and underscore convention for naming variables, sometimes even within the same identifier - that&#039;s a bit mental :P</description>
		<content:encoded><![CDATA[<p>Good work! I think this could be made really useful by making it a more general function: something like (I&#8217;m just sketching the idea here)</p>
<pre class="brush: php;">
function send_html_and_text_email( $to, $from, $subject, $htmlContent, $textContent = &quot;&quot;){

// $to could be an array or a single email, the function would be able
// to deal with it using the is_array function

// The text half of the email, if the parameter is empty, could be extracted
// from the html content, by extracting everything between the &lt;body&gt; tags
// with a regex and then running strip_tags on that

}
</pre>
<p>Like I say, it&#8217;s just a sketch, but could be a really useful library function <img src='http://code.lewro.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Also, one thing I can&#8217;t help but note from your code is the mix of Camel Case and underscore convention for naming variables, sometimes even within the same identifier &#8211; that&#8217;s a bit mental <img src='http://code.lewro.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

