#22355 [Opn->Fbk]: mail func strips linefeeds from subject
| From: | iliaa@php.net | Date: | Mon, 24 Feb 2003 03:50:16 +0000 |
| Subject: | #22355 [Opn->Fbk]: mail func strips linefeeds from subject | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-34048@lists.php.net to get a copy of this message | ||
ID: 22355
Updated by: iliaa@php.net
Reported By: jotta at mailbox dot hu
-Status: Open
+Status: Feedback
Bug Type: Mail related
Operating System: Linux 2.2.20
PHP Version: 4.2.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
I've tried the code & looked over the source and there is nothing that
would 'strip' newlines as you suggest. If they are still being stripped
in the new code I would say it is the doing of your sendmail binary.
Previous Comments:
------------------------------------------------------------------------
[2003-02-21 09:09:22] jotta at mailbox dot hu
Before sending an email, first I'm using mb_encode_mimeheader() to
prepare the subject (it's very important because of the Central
European national characters)
$subject =
mb_encode_mimeheader(
trim($_POST['i_subject']),
'iso-8859-2',
'Q',
"\n\t"
);
\n\t is used, because e-mail RFCs state, that long lines should look be
broken like this:
Subject: very long subject etc. etc. and will
continue here
The problem exactly: mail() function strips the \n characters, this way
the e-mails are sent in a non-standard way (even 200+ characters long
subject lines), and therefore some servers and/or mail reading
softwares fail to transfer/display the email correctly.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22355&edit=1