Bug #17753 Updated: mail() doesn't send body when headers are set (4th parameter)
| From: | WPinegar at healthtech dot net | Date: | Thu, 13 Jun 2002 20:35:55 +0000 |
| Subject: | Bug #17753 Updated: mail() doesn't send body when headers are set (4th parameter) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10387@lists.php.net to get a copy of this message | ||
ID: 17753
Updated by: WPinegar@healthtech.net
Reported By: WPinegar@healthtech.net
-Status: Bogus
+Status: Open
Bug Type: Mail related
Operating System: Windows 2000 Server
PHP Version: 4.0CVS-2002-06-13
New Comment:
The code with "\n" worked perfectly in PHP 4.3.0-dev dated 5/18/2002
and PHP 4.2.0.
The following code also exhibits the same problem in today's CVS build
of PHP 4.3.0-dev:
mail("testuser@mydomain.com", "Test E-Mail", $PHP_AUTH_USER." has sent
a
test e-mail message.", "From: webmaster@mydomain.com");
Notice that there are no \n or \r\n in this code since there is only
one header being passed. With this code the body is not transmitted.
Omitting the header again corrects the problem.
This is definately a new problem in the CVS build...
Previous Comments:
------------------------------------------------------------------------
[2002-06-13 16:29:01] sesser@php.net
Please read the documentation:
Note: You must use \r\n to seperate headers, although some Unix mail
transfer agents may work with just a single newline (\n).
------------------------------------------------------------------------
[2002-06-13 16:16:54] WPinegar@healthtech.net
I just downloaded the latest Win32 build of PHP 4.3.0-dev from
http://snaps.php.net/win32 and noticed that the following
code segment
does not work correctly:
mail("testuser@mydomain.com", "Test E-Mail", $PHP_AUTH_USER." has send
a test e-mail message.", "From: webmaster@mydomain.com\nReply-To:
$replyto\nX-Mailer: PHP/".phpversion());
In the current development version of PHP 4.3.0-dev the e-mail is sent
but there is no body. When I revise my code and omit the headers from
the 4th parameter, everything works fine and the body of the e-mail
message is sent correctly.
mail("testuser@mydomain.com", "Test E-Mail", $PHP_AUTH_USER." has send
a test e-mail message.");
Please correct this problem. Thanks!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17753&edit=1