<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress support forums Topic: bb_mail for user registration</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Topic: bb_mail for user registration</description>
<language>en</language>
<pubDate>Wed, 03 Dec 2008 03:15:26 +0000</pubDate>

<item>
<title>myu on "bb_mail for user registration"</title>
<link>http://bbpress.org/forums/topic/bb_mail-for-user-registration#post-19890</link>
<pubDate>Mon, 13 Oct 2008 10:40:11 +0000</pubDate>
<dc:creator>myu</dc:creator>
<guid isPermaLink="false">19890@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;how silly I was....　trying to encode the whole header array....&#60;/p&#62;
&#60;p&#62;here's the working code, just in case somebody else is too tired to work it out ...&#60;br /&#62;
(from around line542 down)&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;if ($from)
			//$headers[] = &#38;#39;From: &#38;quot;&#38;#39; . bb_get_option(&#38;#39;name&#38;#39;) . &#38;#39;&#38;quot; &#38;lt;&#38;#39; . $from . &#38;#39;&#38;gt;&#38;#39;;	//orig
			//-------edit----------
			$headers[] = &#38;#39;From: &#38;quot;&#38;#39; . mb_encode_mimeheader(bb_get_option(&#38;#39;name&#38;#39;), &#38;#39;utf-8&#38;#39;) . &#38;#39;&#38;quot; &#38;lt;&#38;#39; . $from . &#38;#39;&#38;gt;&#38;#39;;
			//-------end edit----------
	}
	$headers = trim(join(defined(&#38;#39;BB_MAIL_EOL&#38;#39;) ? BB_MAIL_EOL : &#38;quot;\n&#38;quot;, $headers));
//	--------edit --added------------
	$subject = mb_encode_mimeheader($subject, &#38;#39;utf-8&#38;#39;, &#38;#39;B&#38;#39;, defined(&#38;#39;BB_MAIL_EOL&#38;#39;) ? BB_MAIL_EOL : &#38;quot;\n&#38;quot;);

//	--------end edit--------
	return @mail($to, $subject, $message, $headers);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>myu on "bb_mail for user registration"</title>
<link>http://bbpress.org/forums/topic/bb_mail-for-user-registration#post-19826</link>
<pubDate>Sat, 11 Oct 2008 14:01:09 +0000</pubDate>
<dc:creator>myu</dc:creator>
<guid isPermaLink="false">19826@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;hi,&#60;br /&#62;
tried the mb_encode_mimeheader() thing.. but can't get it to work as desired.  :(&#60;/p&#62;
&#60;p&#62;could i please get a bit more of instruction where to put it in with what parameter(s)?&#60;/p&#62;
&#60;p&#62;----what i have tried------&#60;br /&#62;
towards the end of function bb_mail() in bb-includes/pluggable.php&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$headers = trim(join(defined(&#38;#39;BB_MAIL_EOL&#38;#39;) ? BB_MAIL_EOL : &#38;quot;\n&#38;quot;, $headers));

//--added--
$headers = mb_encode_mimeheader($headers, &#38;#39;utf-8&#38;#39;, &#38;#39;B&#38;#39;, defined(&#38;#39;BB_MAIL_EOL&#38;#39;) ? BB_MAIL_EOL : &#38;quot;\n&#38;quot;);
//--end add--

return @mail($to, $subject, $message, $headers);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Although it shows fine as it comes on my Apple Mail, as momo-i and somebody else mentioned, utf8 can get garbled...&#60;/p&#62;
&#60;p&#62;Thank you in advance
&#60;/p&#62;</description>
</item>
<item>
<title>_ck_ on "bb_mail for user registration"</title>
<link>http://bbpress.org/forums/topic/bb_mail-for-user-registration#post-15430</link>
<pubDate>Wed, 16 Apr 2008 17:43:43 +0000</pubDate>
<dc:creator>_ck_</dc:creator>
<guid isPermaLink="false">15430@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I think this post is related:&#60;br /&#62;
&#60;a href=&#34;http://bbpress.org/forums/topic/non-english-characters-in-email-notification-unreadable&#34; rel=&#34;nofollow&#34;&#62;http://bbpress.org/forums/topic/non-english-characters-in-email-notification-unreadable&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>momo-i on "bb_mail for user registration"</title>
<link>http://bbpress.org/forums/topic/bb_mail-for-user-registration#post-15411</link>
<pubDate>Tue, 15 Apr 2008 22:38:36 +0000</pubDate>
<dc:creator>momo-i</dc:creator>
<guid isPermaLink="false">15411@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Hi all,&#60;/p&#62;
&#60;p&#62;I'm using this in Japanese. When the user is registered, mail is garbled. It seems that it is because the mail body is submitted with raw UTF8 (not MIME-encode) also this is because of mail in Japanese(encoded iso-2022-jp) being provided as shown in RFC1468.(See &#60;a href=&#34;http://www.ietf.org/rfc/rfc1468.txt&#34; rel=&#34;nofollow&#34;&#62;http://www.ietf.org/rfc/rfc1468.txt&#60;/a&#62;)&#60;br /&#62;
However, it is possible to display it even in Japanese with UTF8 normally by doing appropriate treatment. &#60;/p&#62;
&#60;p&#62;1. Add Content-Type header and etc.&#60;br /&#62;
    $headers[] = &#34;MIME-Version: 1.0&#34;;&#60;br /&#62;
    $headers[] = &#34;Content-Type: text/plain; Charset=UTF-8&#34;;&#60;br /&#62;
    $headers[] = &#34;Content-Transfer-Encoding: 8bit&#34;;&#60;/p&#62;
&#60;p&#62;2. MIME encodes the header.&#60;br /&#62;
    use mb_encode_mimeheader().&#60;br /&#62;
&#60;a href=&#34;http://www.php.net/manual/en/function.mb-encode-mimeheader.php&#34; rel=&#34;nofollow&#34;&#62;http://www.php.net/manual/en/function.mb-encode-mimeheader.php&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Regards,
&#60;/p&#62;</description>
</item>

</channel>
</rss>
