PHP 4.0 Bug #9859: mail() doesn't send cc or bcc as in the manual instructions
| From: | joel at intwebservices dot com | Date: | Tue, 20 Mar 2001 07:42:22 +0000 |
| Subject: | PHP 4.0 Bug #9859: mail() doesn't send cc or bcc as in the manual instructions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-49457@lists.php.net to get a copy of this message | ||
From: joel@intwebservices.com
Operating system: Windows NT 4.0
PHP version: 4.0.4pl1
PHP Bug Type: Documentation problem
Bug description: mail() doesn't send cc or bcc as in the manual instructions
script example:
-------------------------------------------------------------------------------------------------
<?php
$returnvar="false";
$mailto="you@yourdomain.com";
$mailsubject="cc test";
$mailmessage="message content";
$mailHeader="cc:otheraddress@yourdomain.com\r\n";
$returnvar=mail($mailto,$mailsubject,$mailmessage,$mailHeader);
?>
<html>
<body>
the mail was sent?
<?php
echo "<br>returnvar= $returnvar<br>";
?>
</body>
</html>
---------------------------------------------------------------------------------
The above does not send the carbon copy.
The pdf manual says:
----------------------------------------------------------------------------------------------------------
$headers .= "cc:birthdayarchive@php.net\n"; // CC to
$headers .= "bcc:birthdaycheck@php.net, birthdaygifts@php.net\n"; // BCCs to
/* and now mail it */
mail($recipient, $subject, $message, $headers);
-----------------------------------------------------------------------------------------------------------
That does not work since Win32 sendmail.c looks for case sensitve "Cc:"
sendmail.c also does not look for "bcc:"
Also you must have "\r\n" not just "\n".
I think the problem is here in win32 sendmail.c :
if (headers && (pos1 = strstr(headers, "Cc:"))) {
pos2 = strstr(pos1, "\r\n");
tempMailTo = estrndup(pos1, pos2-pos1);
--
Edit Bug report at: http://bugs.php.net/?id=9859&edit=1