php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13342 A ! every 2041 letters
Submitted: 2001-09-17 06:17 UTC Modified: 2001-10-08 09:09 UTC
From: btrinquier at publicis dot fr Assigned:
Status: Closed Package: Mail related
PHP Version: 4.0.4pl1 OS: Linux/Apache
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
25 - 23 = ?
Subscribe to this entry?

 
 [2001-09-17 06:17 UTC] btrinquier at publicis dot fr
Hello,

The script :

$mail_body = "";
for ($i=0; $i <500; $i++) {
$mail_body .= "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
}	

$subject = "Testing";
mail($adress, $subjet, $mail_body);

When receiving the mail, a character ! is inserted every 2041 chars.

If the message is changed into :
$mail_body .= "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n";
the received mail is good.

It is not very usual to send a mail without carriage return, but we discovered this bug sending an HTML message, with <br> and without \n. Introducing some \n resolve the problem.

Best regards

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-17 06:36 UTC] hholzgra@php.net
most likely sendmail related
as PHP mail() for unix just passes the
message text to the local sendmail binary via popen()

could someone please check the SMTP RFCs
for line length limits ?
 [2001-09-17 06:56 UTC] swm@php.net
I cannot recreate this 4.0.5 or current CVS. As for line
length, RFC 821 says the following:

text line

 The maximum total length of a text line including the
 <CRLF> is 1000 characters (but not counting the leading
 dot duplicated for transparency).

Theorectically, it is the responsibility of the MTA
(sendmail/postfix/Exim/qmail etc) to handle this not PHP.

Can you recreate this with current CVS?
 [2001-10-08 09:09 UTC] sander@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Aug 04 01:01:24 2021 UTC