#20538 [Fbk->Csd]: Cc: in mail won't work in some cases

From: Date: Thu, 21 Nov 2002 16:35:49 +0000
Subject: #20538 [Fbk->Csd]: Cc: in mail won't work in some cases
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-25433@lists.php.net to get a copy of this message
ID: 20538 Updated by: joey@php.net Reported By: pvy@novosoft.ru -Status: Feedback +Status: Closed Bug Type: *Mail Related Operating System: windows 2000/sp3 PHP Version: 4.2.3 New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Vladimir: This is fixed correctly in sendmail.c:1.32. See http://cvs.php.net/co.php/php4/win32/sendmail.c?login=2&r=1.32 for fix. -- Joey Previous Comments: ------------------------------------------------------------------------ [2002-11-21 05:29:16] jan@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-11-21 05:21:53] pvy@novosoft.ru Why not a bug? why bogus? Please look at sendmail.c in win32 directory: if (headers && (pos1 = strstr(headers, "Cc:"))) { if (NULL == (pos2 = strstr(pos1, "\r\n"))) { tempMailTo = estrndup(pos1, strlen(pos1)); } else { 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); } in this code, we can see, what in Buffer posts line like: RCPT TO: <Cc: email@address.org> for first Cc: address and right string for (RCPT TO: <secondaddress@dot.com>) it is really strange? Right code: if (headers && (pos1 = strstr(headers, "Cc:"))) { pos1+=3; if (NULL == (pos2 = strstr(pos1, "\r\n"))) ...... after this procedure add: pos1-=3; ------------------------------------------------------------------------ [2002-11-21 03:56:29] jan@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. ------------------------------------------------------------------------ [2002-11-21 03:52:59] pvy@novosoft.ru Hello! I wrote small php script: <? error_reporting(E_ALL); mail ('pvy@novosoft.ru','subject','body','Cc: pvy@novosoft.ru'); ?> When my SMTP server points to unix machine (sendmail/linux) all working fine. When I set SMTP server pointed to IIS5 SMTP server (localhost) I got 'Server Error message'. any idea? vladimir ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20538&edit=1

« previous php.bugs (#25433) next »