Win32 Manual error?
| From: | Boaz Amit | Date: | Tue, 14 Aug 2001 05:29:05 +0000 |
| Subject: | Win32 Manual error? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-62524@lists.php.net to get a copy of this message | ||
While building a simple feedback form, I came across what seemed like a puzzling error(?) in the
manual.
After the user has filled the form I call for the mail() function. To do so, I referred to the
manual about the mail function: http://php.net/manual/en/function.mail.php
"...Please also note that the cc: and bcc: headers are case sensitive and should be written as
Cc: and Bcc: on Win32 systems."
Since I Am using a Win32 system, and accustomed with the many 'nuances' involved in
running PHP on Windows, I followed to the letter.
<?php
/* subject and message are arguments returned from the form */
$headers = "From: Me <Me@myplace.com>\r\nCc: someonelse@wherever.com\r\nBcc:
log@myplace.com";
mail($address, $subject, $message, $headers);
?>
When I ran the script IE repeatedly launched an error message saying the page can't be opened,
and the connection with the server has been reset. The mail of course wasn't sent, as well.
I tried a few different ways to write the headers argument, but none of them worked unless I removed
the 'cc' and 'bcc' ones. Then finally I gave up, and wrote them case
insensitive.
$headers = "cc: someonelse@wherever.com\r\nbcc: log@myplace.com";
To my surprise that worked perfectly, and produced no error at all, despite of the explicit warning
in the manual.
It really is no biggie, the script Is Working. But it is interesting, as I usually assume that on
these matters the manual is accurate. I also checked the PHP Manual Errata
(http://www.php.net/manual/browse-errata.php) , but no one seems to report this error before.
I would appreciate it if someone would clear the matter, as it seems very unlikely to me that the
fault is in the manual, rather than in my system.
I am using Apache 1.3.12 and PHP 4.0.6, on a Win32 (95) system.
---
regards,
Boaz Amit