<?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"
	>
<channel>
	<title>Comments for Occupied, DND, Away</title>
	<atom:link href="http://www.anty.info/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anty.info</link>
	<description>A busy guys notes on web development.</description>
	<pubDate>Thu, 24 Jul 2008 16:38:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>Comment on Zend_Mail Obstacles by Robert G.</title>
		<link>http://www.anty.info/2008/02/18/zend_mail-obstacles/#comment-61</link>
		<dc:creator>Robert G.</dc:creator>
		<pubDate>Thu, 10 Jul 2008 19:03:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.anty.info/2008/02/18/zend_mail-obstacles/#comment-61</guid>
		<description>Thank you for posting the hint about
$mail-&#62;setType(Zend_Mime::MULTIPART_RELATED);

I tried for hours to send a mail with inline images and this was the only thing I did not do.
After adding this line it worked perfectly, thanks again!</description>
		<content:encoded><![CDATA[<p>Thank you for posting the hint about<br />
$mail-&gt;setType(Zend_Mime::MULTIPART_RELATED);</p>
<p>I tried for hours to send a mail with inline images and this was the only thing I did not do.<br />
After adding this line it worked perfectly, thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fortune Cookie by and The Cookies Are</title>
		<link>http://www.anty.info/2008/05/19/fortune-cookie/#comment-43</link>
		<dc:creator>and The Cookies Are</dc:creator>
		<pubDate>Fri, 23 May 2008 08:18:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.anty.info/?p=18#comment-43</guid>
		<description>[...] (updated) Occupied DNDs over at anty   bookmark this [...]</description>
		<content:encoded><![CDATA[<p>[...] (updated) Occupied DNDs over at anty   bookmark this [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What you pay for sending 10 million spam mails a day by anty</title>
		<link>http://www.anty.info/2008/03/29/what-you-pay-for-sending-10-million-spam-mails-a-day/#comment-41</link>
		<dc:creator>anty</dc:creator>
		<pubDate>Wed, 09 Apr 2008 18:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.anty.info/2008/03/29/what-you-pay-for-sending-10-million-spam-mails-a-day/#comment-41</guid>
		<description>You are right, but even the Russian prices would be interesting. Most of this business is done in Russia anyways.</description>
		<content:encoded><![CDATA[<p>You are right, but even the Russian prices would be interesting. Most of this business is done in Russia anyways.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Keep focused! by anty</title>
		<link>http://www.anty.info/2007/12/07/keep-focused/#comment-40</link>
		<dc:creator>anty</dc:creator>
		<pubDate>Wed, 09 Apr 2008 18:13:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.anty.info/2007/12/07/keep-focused/#comment-40</guid>
		<description>Yes, affiliate marketing can be disappointing sometimes. Especially when you have to search converting merchants to begin with. I know I tried many offers, but only a few actually converted.
The worst merchant I got to date has no conversions with 4367 unique hits.

3 days are not a reachable goal if your site is new unless you get traffic from somewhere else like AdWords and such.

I made my first sale after one and a half month with a bunch of brand new sites.

Don't give up and thanks for commenting!</description>
		<content:encoded><![CDATA[<p>Yes, affiliate marketing can be disappointing sometimes. Especially when you have to search converting merchants to begin with. I know I tried many offers, but only a few actually converted.<br />
The worst merchant I got to date has no conversions with 4367 unique hits.</p>
<p>3 days are not a reachable goal if your site is new unless you get traffic from somewhere else like AdWords and such.</p>
<p>I made my first sale after one and a half month with a bunch of brand new sites.</p>
<p>Don&#8217;t give up and thanks for commenting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Keep focused! by Jagdu</title>
		<link>http://www.anty.info/2007/12/07/keep-focused/#comment-39</link>
		<dc:creator>Jagdu</dc:creator>
		<pubDate>Wed, 09 Apr 2008 17:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.anty.info/2007/12/07/keep-focused/#comment-39</guid>
		<description>Dang it's hard to stay focused when your small targets aren't reached by the time you think they should.  For example on an affiliate site of mine.  I thought that after 3 days I should have at least one sale.  Now a week later I have nothing!  But I need to stay focused.</description>
		<content:encoded><![CDATA[<p>Dang it&#8217;s hard to stay focused when your small targets aren&#8217;t reached by the time you think they should.  For example on an affiliate site of mine.  I thought that after 3 days I should have at least one sale.  Now a week later I have nothing!  But I need to stay focused.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What you pay for sending 10 million spam mails a day by Jagdu</title>
		<link>http://www.anty.info/2008/03/29/what-you-pay-for-sending-10-million-spam-mails-a-day/#comment-38</link>
		<dc:creator>Jagdu</dc:creator>
		<pubDate>Wed, 09 Apr 2008 16:57:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.anty.info/2008/03/29/what-you-pay-for-sending-10-million-spam-mails-a-day/#comment-38</guid>
		<description>It's such a black market that prices vary wildly.  I can't imagine there are too many sites (except maybe .ru) that explicitly state prices for illegal actions.</description>
		<content:encoded><![CDATA[<p>It&#8217;s such a black market that prices vary wildly.  I can&#8217;t imagine there are too many sites (except maybe .ru) that explicitly state prices for illegal actions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zend_Mail Obstacles by anty</title>
		<link>http://www.anty.info/2008/02/18/zend_mail-obstacles/#comment-37</link>
		<dc:creator>anty</dc:creator>
		<pubDate>Wed, 09 Apr 2008 08:43:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.anty.info/2008/02/18/zend_mail-obstacles/#comment-37</guid>
		<description>@Wayne: I try to extract the important things from my script for you.
Here's how to determine the image type:

&lt;code class="prettyprint"&gt;// getimagesize returns false, if the URL does not exist
if (file_exists($imagePath) &#124;&#124; getimagesize($imagePath)) {
	$image = file_get_contents($imagePath);
	if (function_exists('exif_imagetype') &#038;&#038; function_exists('image_type_to_mime_type')) {
		$imageType = image_type_to_mime_type(exif_imagetype($imagePath));
	}
}&lt;/code&gt;

I did this to replace all image-tags in my mail template with references to the attached images (cid):

&lt;code class="prettyprint"&gt;if (!is_null($image)) {
	$cid = md5($image) .'.'. md5(microtime());
	$images[$cid] = array($image, $imageType);
	if (trim($src[1]) == '' &#038;&#038; trim($src[2]) != '') {
		$templateMessageTemp = preg_replace('/(&lt;img\\s[^&gt;]*src=)(?:"' . preg_quote($src[2], '/') .'"&#124;\\\''. preg_quote($src[2], '/') .'\\\')([^&gt;]*&gt;)/i', '${1}"cid:'. $cid .'"${2}', $templateMessage);
	} elseif (trim($src[1]) != '') {
		$templateMessageTemp = preg_replace('/(&lt;img\\s[^&gt;]*src=)(?:"' . preg_quote($src[1], '/') .'"&#124;\\\''. preg_quote($src[1], '/') .'\\\')([^&gt;]*&gt;)/i', '${1}"cid:'. $cid .'"${2}', $templateMessage);
	}

	if ($templateMessageTemp == $templateMessage) {
		// nothing was replaced (duplicate images whas used), ignore this image
		unset($images[$cid]);
	}

	$templateMessage = $templateMessageTemp;
}&lt;/code&gt;

Here is how I attached the images with the right cid:

&lt;code class="prettyprint"&gt;// attach images
foreach ($images as $cid =&gt; $image) {
	$imageData = $image[0];
	$imageType = $image[1];
	if ($imageType === false) {
		$at = $mail-&gt;createAttachment($imageData);
	} else {
		$at = $mail-&gt;createAttachment($imageData, $imageType, Zend_Mime::DISPOSITION_INLINE, Zend_Mime::ENCODING_BASE64);
	}

	$at-&gt;id = $cid;
}&lt;/code&gt;

I hope this helps you!</description>
		<content:encoded><![CDATA[<p>@Wayne: I try to extract the important things from my script for you.<br />
Here&#8217;s how to determine the image type:</p>
<p><code class="prettyprint">// getimagesize returns false, if the URL does not exist
if (file_exists($imagePath) || getimagesize($imagePath)) {
	$image = file_get_contents($imagePath);
	if (function_exists('exif_imagetype') &amp;&amp; function_exists('image_type_to_mime_type')) {
		$imageType = image_type_to_mime_type(exif_imagetype($imagePath));
	}
}</code></p>
<p>I did this to replace all image-tags in my mail template with references to the attached images (cid):</p>
<p><code class="prettyprint">if (!is_null($image)) {
	$cid = md5($image) .'.'. md5(microtime());
	$images[$cid] = array($image, $imageType);
	if (trim($src[1]) == " &amp;&amp; trim($src[2]) != ") {
		$templateMessageTemp = preg_replace('/(&lt;img\\s[^&gt;]*src=)(?:&quot;' . preg_quote($src[2], '/') .'&quot;|\\\". preg_quote($src[2], '/') .'\\\')([^&gt;]*&gt;)/i', '${1}&quot;cid:'. $cid .'&quot;${2}', $templateMessage);
	} elseif (trim($src[1]) != ") {
		$templateMessageTemp = preg_replace('/(&lt;img\\s[^&gt;]*src=)(?:&quot;' . preg_quote($src[1], '/') .'&quot;|\\\". preg_quote($src[1], '/') .'\\\')([^&gt;]*&gt;)/i', '${1}&quot;cid:'. $cid .'&quot;${2}', $templateMessage);
	}

	if ($templateMessageTemp == $templateMessage) {
		// nothing was replaced (duplicate images whas used), ignore this image
		unset($images[$cid]);
	}

	$templateMessage = $templateMessageTemp;
}</code></p>
<p>Here is how I attached the images with the right cid:</p>
<p><code class="prettyprint">// attach images
foreach ($images as $cid =&gt; $image) {
	$imageData = $image[0];
	$imageType = $image[1];
	if ($imageType === false) {
		$at = $mail-&gt;createAttachment($imageData);
	} else {
		$at = $mail-&gt;createAttachment($imageData, $imageType, Zend_Mime::DISPOSITION_INLINE, Zend_Mime::ENCODING_BASE64);
	}

	$at-&gt;id = $cid;
}</code></p>
<p>I hope this helps you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zend_Mail Obstacles by Wayne</title>
		<link>http://www.anty.info/2008/02/18/zend_mail-obstacles/#comment-36</link>
		<dc:creator>Wayne</dc:creator>
		<pubDate>Wed, 09 Apr 2008 06:30:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.anty.info/2008/02/18/zend_mail-obstacles/#comment-36</guid>
		<description>Thanks for your post on 'Inline images are displayed as attachments' ... we have REALLY battled to find any help on attaching images inline with the zend_mail... do you by any chance have a full example of how you attached the images into the body, without the image showing as a jpeg?
thanks a mill!!</description>
		<content:encoded><![CDATA[<p>Thanks for your post on &#8216;Inline images are displayed as attachments&#8217; &#8230; we have REALLY battled to find any help on attaching images inline with the zend_mail&#8230; do you by any chance have a full example of how you attached the images into the body, without the image showing as a jpeg?<br />
thanks a mill!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zend_Mail Obstacles by alban</title>
		<link>http://www.anty.info/2008/02/18/zend_mail-obstacles/#comment-10</link>
		<dc:creator>alban</dc:creator>
		<pubDate>Sun, 24 Feb 2008 09:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.anty.info/2008/02/18/zend_mail-obstacles/#comment-10</guid>
		<description>new Zend_Mail('utf-8'); 
thank !!!</description>
		<content:encoded><![CDATA[<p>new Zend_Mail(&#8217;utf-8&#8242;);<br />
thank !!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
