PHP 4.0 Bug #5230: sendmail.c php4.0 missing code from version 3.0 for multiple recipients and CC
| From: | joel at intwebservices dot com | Date: | Sun, 25 Jun 2000 23:45:31 +0000 |
| Subject: | PHP 4.0 Bug #5230: sendmail.c php4.0 missing code from version 3.0 for multiple recipients and CC | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-22317@lists.php.net to get a copy of this message | ||
From: joel@intwebservices.com
Operating system: Windows NT 4.0
PHP version: 4.0.0 Release
PHP Bug Type: Misbehaving function
Bug description: sendmail.c php4.0 missing code from version 3.0 for multiple recipients and CC
After checking through the sendmail.c code for version 3 and 4, I noticed that the code for multiple
recipients and CC which was in version 3 is not included in version 4 in the SendText() function.
This might explain why Mail() does not send to multiple recipients or CC in version 4.0.
This code from version 3 is missing in version 4.
----------------------------------------------------------------------------
tempMailTo = estrdup(mailTo);
// Send mail to all rcpt's
token = strtok(tempMailTo, ",");
while(token != NULL)
{
sprintf(GLOBAL(Buffer), "RCPT TO:<%s>\r\n", token);
if ((res = Post(GLOBAL(Buffer))) != SUCCESS)
return (res);
if ((res = Ack()) != SUCCESS)
return (res);
token = strtok(NULL, ",");
}
// Send mail to all Cc rcpt's
efree(tempMailTo);
if (pos1 = strstr(headers, "Cc:")) {
pos2 = strstr(pos1, "\r\n");
tempMailTo = estrndup(pos1, pos2-pos1);
token = strtok(tempMailTo, ",");
while(token != NULL)
{
sprintf(GLOBAL(Buffer), "RCPT TO:<%s>\r\n", token);
if ((res = Post(GLOBAL(Buffer))) != SUCCESS)
return (res);
if ((res = Ack()) != SUCCESS)
return (res);
token = strtok(NULL, ",");
}
efree(tempMailTo);
}
--------------------------------------------------------------------------------------------------