|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21798 New mail() function disable some functionalities
Submitted: 2003-01-21 11:19 UTC Modified: 2003-01-28 05:33 UTC
From: webmaster at a-display dot net Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.3.0 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: webmaster at a-display dot net
New email:
PHP Version: OS:


 [2003-01-21 11:19 UTC] webmaster at a-display dot net
We use a small php script to sent multipart/mime mails with text/html and pics included in the same mail.

People are reading these mails mostly with Outlook Express.

Outlook Express seems to require some mime sections separated by \r\n\r\n, and maybe other mail readers need it too (no test made for now).

but since 4.3.0 a part of code in the win32\sendmail.c file replaces every  double \r\n by a single one.

I don't know why these changes have been done, but please disable them or give us a way to disable this feature by the php.ini file, without having to change and compile the whole project (we don't have a C compiler)

              Code mentioned above.

/* This pattern removes \r\n from the start of the string,
 * \r\n from the end of the string and also makes sure every line
 * is only wrapped with a single \r\n (thus reduces multiple
 * occurences of \r\n between lines to a single \r\n) */
#define PHP_WIN32_MAIL_RMVDBL_PATTERN	"/^\r\n|(\r\n)+$/m"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-27 16:27 UTC]
The pattern you're reference is only applied to the headers (passed as the fourth parameter of mail() ) which should never have a double \r\n as that delineates the header from the body.  Are you attempting to send content inside your header?

Content (even multipart/mime content) should ALWAYS be sent in the body.
 [2003-01-28 03:27 UTC] webmaster at a-display dot net
Thank for the answer.

Yes, the whole mail is send by the headers field.

At the time we made the script, it was the only way we found to get it working...

Have you some samples of what to put in headers and what to put in message ? we're going to try different ways on our side.
 [2003-01-28 03:32 UTC]
Okay, not a bug then. Please consult the mailinglist for user questions.

 [2003-01-28 05:10 UTC] webmaster at a-display dot net
Ok, we had to send everything in headers field with previous version of PHP.

With 4.3.0 sending in headers + message works fine, even with large e-mails.

Thanks a lot.
 [2003-01-28 05:33 UTC]
still not bug in PHP -> bogus
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 23:01:29 2024 UTC