mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Revert the sendmail.c patch - it uses 4 different variables that aren't defined, and breaks
the Win32 build
This commit is contained in:
parent
eaa2a158c8
commit
130b9e7ef2
1 changed files with 12 additions and 30 deletions
|
@ -214,7 +214,7 @@ int SendText(char *RPath, char *Subject, char *mailTo, char *data, char *headers
|
||||||
if (strchr(mailTo, '@') == NULL)
|
if (strchr(mailTo, '@') == NULL)
|
||||||
return (BAD_MSG_DESTINATION);
|
return (BAD_MSG_DESTINATION);
|
||||||
|
|
||||||
sprintf(Buffer, "HELO %s\r\n", LocalHost);
|
sprintf(Buffer, "HELO %s\n", LocalHost);
|
||||||
|
|
||||||
/* in the beggining of the dialog */
|
/* in the beggining of the dialog */
|
||||||
/* attempt reconnect if the first Post fail */
|
/* attempt reconnect if the first Post fail */
|
||||||
|
@ -226,38 +226,20 @@ int SendText(char *RPath, char *Subject, char *mailTo, char *data, char *headers
|
||||||
if ((res = Ack()) != SUCCESS)
|
if ((res = Ack()) != SUCCESS)
|
||||||
return (res);
|
return (res);
|
||||||
|
|
||||||
// Send mail to all rcpt's
|
sprintf(Buffer, "MAIL FROM:<%s>\n", RPath);
|
||||||
token = strtok(tempMailTo, ",");
|
if ((res = Post(Buffer)) != SUCCESS)
|
||||||
while(token != NULL)
|
return (res);
|
||||||
{
|
if ((res = Ack()) != SUCCESS)
|
||||||
sprintf(Buffer, "RCPT TO:<%s>\r\n", token);
|
return (res);
|
||||||
if ((res = Post(Buffer)) != SUCCESS)
|
|
||||||
return (res);
|
|
||||||
if ((res = Ack()) != SUCCESS)
|
|
||||||
return (res);
|
|
||||||
token = strtok(NULL, ",");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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, ",");
|
sprintf(Buffer, "RCPT TO:<%s>\n", mailTo);
|
||||||
while(token != NULL)
|
if ((res = Post(Buffer)) != SUCCESS)
|
||||||
{
|
return (res);
|
||||||
sprintf(Buffer, "RCPT TO:<%s>\r\n", token);
|
if ((res = Ack()) != SUCCESS)
|
||||||
if ((res = Post(Buffer)) != SUCCESS)
|
return (res);
|
||||||
return (res);
|
|
||||||
if ((res = Ack()) != SUCCESS)
|
|
||||||
return (res);
|
|
||||||
token = strtok(NULL, ",");
|
|
||||||
}
|
|
||||||
efree(tempMailTo);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((res = Post("DATA\r\n")) != SUCCESS)
|
if ((res = Post("DATA\n")) != SUCCESS)
|
||||||
return (res);
|
return (res);
|
||||||
if ((res = Ack()) != SUCCESS)
|
if ((res = Ack()) != SUCCESS)
|
||||||
return (res);
|
return (res);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue