Bug #11616: Cc: & Bcc: not being picked up from header

From: Date: Fri, 22 Jun 2001 14:21:45 +0000
Subject: Bug #11616: Cc: & Bcc: not being picked up from header
Groups: php.dev 
Request: Send a blank email to php-dev+get-57671@lists.php.net to get a copy of this message
From: bmatzelle@yahoo.com Operating system: Win 2K Server PHP version: 4.0.5 PHP Bug Type: Mail related Bug description: Cc: & Bcc: not being picked up from header I am running PHP as CGI on IIS 5.0 with service pack 2. This report verifies that bug #11349 is a definate problem. /win32/sendmail.c has the following code (starting at line 253): /* Send mail to all Cc rcpt's */ efree(tempMailTo); if (headers && (pos1 = strstr(headers, "Cc:"))) { pos2 = strstr(pos1, "\r\n"); tempMailTo = estrndup(pos1, pos2-pos1); token = strtok(tempMailTo, ","); while(token != NULL) { sprintf(Buffer, "RCPT TO:<%s>\r\n", token); if ((res = Post(Buffer)) != SUCCESS) return (res); if ((res = Ack()) != SUCCESS) return (res); token = strtok(NULL, ","); } efree(tempMailTo); } The above code can only grab an email address that looks like this: Cc: jack@smith.com When I place it in this format I receive a "Warning: Server Error" message from the mail() function. sendmail.c cannot find a proper RFC 822 mail header like: Cc: Jack Smith <jack@smith.com> When I place this in the mail headers nothing happens. Also, there is no code at all that even looks for a Bcc address in the sendmail.c code. This is a massive problem. In order for the mail() function to be /usr/sbin/sendmail compliant it must be able to find and parse Cc: and Bcc: in each of the above formats. It must also remove the Bcc's from the header so that recieving mail clients cannot see them, just as sendmail does. Brent -- Edit Bug report at: http://bugs.php.net/?id=11616&edit=1

« previous php.dev (#57671) next »