ShaKeD Posted December 2, 2008 Share Posted December 2, 2008 Hey to all, I`m trying to send mail, with http://pear.php.net/package/Mail. my functions page formatted as ASCI UTF8 without BOM (using notepad++) and when I make my email, my header is $utf8h = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"; when I return my $html I use return iconv("UTF-8", "ISO-8859-8", $html); and then send my email: preparing to send: $html = build_newsletter($values); $text = 'Text version of email'; // sends it to the clients list: require_once('Mail.php'); require_once('Mail/mime.php'); global $websiteName; $today = date("d/m/Y"); $hdrs = array( 'From' => "$websiteName mail <newsletter@".str_replace(" ","","$websiteName").".co.il>", 'Subject' => "[$today] ניוזלטר מאתר $websiteName: {$values['title']}", 'Content-type' => 'text/plain; charset=iso-8859-1' //str_replace(" "," ","[$today] ניוזלטר מאתר $websiteName: {$values['title']}") ); $crlf = "\n"; $mime = new Mail_mime($crlf); $mime->setTXTBody($text); $mime->setHTMLBody($html); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail'); //send our email! $x = $mail->send($client_address, $hdrs, $html); sorry about my bad english and thank you all for the help! Shaked. Link to comment https://forums.phpfreaks.com/topic/135205-mail-pear-utf-8-hebrew-charcters-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.