note 37626 added to function.mail
| From: | jazfresh at spamjavelin dot hotmaildotcom | Date: | Fri, 21 Nov 2003 09:39:23 +0000 |
| Subject: | note 37626 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60742@lists.php.net to get a copy of this message | ||
Some MTAs (notably sendmail) can autoconvert quoted-printable (and other formats) into 8bit. In my
case, quoted-printable iso-2022-jp Japanese emails were autoconverted to 8bit
Content-Transfer-Encoding, and this failed to work properly on some popular Japanese email clients.
To get around this, I had to send the mail as 8 bit, by just passing the raw ISO-2022-JP text
straight to mail() and using a Content-Transfer-Encoding of "8bit".
Here's a handy function for making sure your body's lines are terminated with \\r\\n, even
if only some are \\n and some are \\r\\n (useful if you're using a mix of functions to build
your message).
<?php
$body = implode("\r\n", preg_split("/\r?\n/", $body));
?>
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37626
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37626&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37626&report=yes
Search -- http://master.php.net/manage/user-notes.php