Re: How to enable UTF-8 Subject String ? Only Body is set ok

From: Date: Tue, 17 May 2011 16:02:29 +0000
Subject: Re: How to enable UTF-8 Subject String ? Only Body is set ok
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-312836@lists.php.net to get a copy of this message
Hello Eli, I'm using this code: private function HeaderEncode ($str) { // For the compatibility with PHP versions lower than 5.3.0 if (!function_exists ('quoted_printable_encode')) { function quoted_printable_encode ($str) { $res=str_replace ("+", "_", str_replace ("%", "=", urlencode($str))); return $res; } } $result='=?utf-8?Q?'.quoted_printable_encode($str).'?='; return $result; } If you want to send mail through an SMTP server, consider using a class written by myself :-): http://hkc.im/Y The class is documented and ships with examples. -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion ------------ Original message ------------ From: Eli Orr (Office) <eli.orr@logodial.com> To: php-general@lists.php.net Date created: , 5:59:26 PM Subject: [PHP] How to enable UTF-8 Subject String ? Only Body is set ok Hi, I'm trying to enable a whole Email as UTF-8 - The Body is OK but the Subject remains ANSI - Please help $headers = "From:$from". "\r\n" . "Reply-To:$from" . "\r\n" . "*Content-type:text/html;charset=utf-8;"*."\r\n" . "X-Mailer: PHP/".phpversion(); -- Best Regards, *Eli Orr* CTO & Founder *LogoDial Ltd.* M:+972-54-7379604 O:+972-74-703-2034 F: +972-77-3379604 Plaut 10, Rehovot, Israel Email: _Eli.Orr@LogoDial.com_ Skype: _eliorr.com_

« previous php.general (#312836) next »