cvs: php4 /win32 sendmail.c
| From: | Zeev Suraski | Date: | Tue, 27 Jun 2000 18:41:44 +0000 |
| Subject: | cvs: php4 /win32 sendmail.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-512@lists.php.net to get a copy of this message | ||
zeev Tue Jun 27 11:41:44 2000 EDT
Modified files:
/php4/win32 sendmail.c
Log:
Revert the sendmail.c patch - it uses 4 different variables that aren't defined, and breaks
the Win32 build
Index: php4/win32/sendmail.c
diff -u php4/win32/sendmail.c:1.9 php4/win32/sendmail.c:1.10
--- php4/win32/sendmail.c:1.9 Tue Jun 27 09:15:16 2000
+++ php4/win32/sendmail.c Tue Jun 27 11:41:44 2000
@@ -214,7 +214,7 @@
if (strchr(mailTo, '@') == NULL)
return (BAD_MSG_DESTINATION);
- sprintf(Buffer, "HELO %s\r\n", LocalHost);
+ sprintf(Buffer, "HELO %s\n", LocalHost);
/* in the beggining of the dialog */
/* attempt reconnect if the first Post fail */
@@ -226,38 +226,20 @@
if ((res = Ack()) != SUCCESS)
return (res);
- // Send mail to all rcpt's
- 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, ",");
- }
+ sprintf(Buffer, "MAIL FROM:<%s>\n", RPath);
+ if ((res = Post(Buffer)) != SUCCESS)
+ return (res);
+ if ((res = Ack()) != SUCCESS)
+ return (res);
- // 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);
- }
+ sprintf(Buffer, "RCPT TO:<%s>\n", mailTo);
+ if ((res = Post(Buffer)) != SUCCESS)
+ return (res);
+ if ((res = Ack()) != SUCCESS)
+ return (res);
- if ((res = Post("DATA\r\n")) != SUCCESS)
+ if ((res = Post("DATA\n")) != SUCCESS)
return (res);
if ((res = Ack()) != SUCCESS)
return (res);