<?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>Good ITea :: MS Tech Share &#187; PHP程式設計</title>
	<atom:link href="http://blog.lansea-chu.com/index.php/archives/category/teach/php%e7%a8%8b%e5%bc%8f%e8%a8%ad%e8%a8%88/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.lansea-chu.com</link>
	<description>Good Idea from Good ITea</description>
	<lastBuildDate>Tue, 27 Jul 2010 21:51:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[PHP]解決SugarCRM底下的活動信件亂碼問題</title>
		<link>http://blog.lansea-chu.com/index.php/archives/566</link>
		<comments>http://blog.lansea-chu.com/index.php/archives/566#comments</comments>
		<pubDate>Thu, 31 Dec 2009 21:02:20 +0000</pubDate>
		<dc:creator>Lansea.Chu</dc:creator>
				<category><![CDATA[PHP程式設計]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.lansea-chu.com/?p=566</guid>
		<description><![CDATA[目前測出的原因是第三方的郵寄組件有問題
PHPMailer在處理郵件標題的時候,對UTF8的轉換不完全導致
整封活動信件寄出去都會變亂碼

暫時解決方法分享如下
==================
修改includes/phpmailer/class.phpmailer.php
尋找
function EncodeHeader ($str, $position = &#8216;text&#8217;) {
改為
function EncodeHeader ($str, $position = &#8216;text&#8217;, $pl = 0) {
if ( $pl ) return 『=?』 . $this-&#62;CharSet . 『?B?』 . base64_encode($str) . 『?=』;
接著尋找
$this-&#62;HeaderLine(『Subject』, $this-&#62;EncodeHeader
在目前函數最後方加上,&#8217;text&#8217;,1 的參數進去


]]></description>
			<content:encoded><![CDATA[<p>目前測出的原因是第三方的郵寄組件有問題</p>
<p>PHPMailer在處理郵件標題的時候,對UTF8的轉換不完全導致</p>
<p>整封活動信件寄出去都會變亂碼</p>
<p><span id="more-566"></span></p>
<p>暫時解決方法分享如下</p>
<p>==================</p>
<p>修改includes/phpmailer/class.phpmailer.php</p>
<p>尋找</p>
<p><span style="color: #ff0000;"><strong>function EncodeHeader ($str, $position = &#8216;text&#8217;) {</strong></span></p>
<p>改<span style="color: #000000;">為</span></p>
<p><span style="color: #ff0000;"><strong>function EncodeHeader ($str, $position = &#8216;text&#8217;, $pl = 0) {</p>
<p>if ( $pl ) return 『=?』 . $this-&gt;CharSet . 『?B?』 . base64_encode($str) . 『?=』;</strong></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">接著尋找</span></span></p>
<p><strong><span style="color: #ff0000;">$this-&gt;HeaderLine(『Subject』, $this-&gt;EncodeHeader</span></strong></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">在目前函數最後方<span style="color: #ff0000;"><strong>加上,&#8217;text&#8217;,1 的參數進去</strong></span></span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;"><br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lansea-chu.com/index.php/archives/566/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
