|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-06-28 12:19 UTC] hholzgra at cvs dot php dot net
[2000-07-04 23:11 UTC] hholzgra at cvs dot php dot net
[2000-07-12 12:51 UTC] jah at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 23 10:00:01 2025 UTC |
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); } --------------------------------------------------------------------------------------------------