note 60204 added to function.mb-encode-mimeheader
| From: | chappy at citromail dot hu | Date: | Thu, 29 Dec 2005 19:44:52 +0000 |
| Subject: | note 60204 added to function.mb-encode-mimeheader | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100948@lists.php.net to get a copy of this message | ||
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;
}
----
Manual Page -- http://www.php.net/manual/en/function.mb-encode-mimeheader.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60204
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60204&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60204&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60204&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60204&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60204&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60204&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60204&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60204&report=yes
Search -- http://master.php.net/manage/user-notes.php