note 60204 deleted from function.mb-encode-mimeheader by nlopess

From: Date: Thu, 29 Dec 2005 20:38:50 +0000
Subject: note 60204 deleted from function.mb-encode-mimeheader by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-100952@lists.php.net to get a copy of this message
Note Submitter: chappy at citromail dot hu ---- I have tested this code, and it works. Ii's good, if mb_string library not loaded in PHP. I have tested with MS Outlook 6 and it uses 42 characters in the subject and other headers for sending mail (I only use iso-8859-2 and 1). If it doesn't work, set $s to 24 function encode(&$str,$encoding='iso-8859-2',$linefeed="\r\n\t"){ $p=0; $s=42; $strr=''; while($pos<strlen($str)){ $sub=substr($strr,$p,$s); $pos+=strlen($sub); $strr="=?".$encoding."?B?".base64_encode($sub)."?=".$linefeed; } $str=$strr; }

« previous php.notes (#100952) next »