|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-11-21 03:52 UTC] pvy at novosoft dot 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 14:00:01 2025 UTC |
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;