PHP 4.0 Bug #9858: mail() still doesn't send cc

From: Date: Tue, 20 Mar 2001 06:45:26 +0000
Subject: PHP 4.0 Bug #9858: mail() still doesn't send cc
Groups: php.dev 
Request: Send a blank email to php-dev+get-49455@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: Performance problem Bug description: mail() still doesn't send cc 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. 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); Should be tempMailTo = estrndup(pos1+2, pos2-pos1); I think since the pos of "Cc: would give the position of the first C in "Cc:". "headers" should also be made all upper case to catch the "cc" or the "CC" -- Edit Bug report at: http://bugs.php.net/?id=9858&edit=1

« previous php.dev (#49455) next »