diff options
author | Zeev Suraski <zeev@php.net> | 2000-06-27 18:41:44 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-06-27 18:41:44 +0000 |
commit | 130b9e7ef248be3beffa72b2ee7183af16d3b86d (patch) | |
tree | b7b4a65ea8acde8d72c92fa6f6c3b562a9922843 /win32/sendmail.c | |
parent | eaa2a158c88e05e3c326c0238d7f49ac16b4ed4e (diff) | |
download | php-git-130b9e7ef248be3beffa72b2ee7183af16d3b86d.tar.gz |
Revert the sendmail.c patch - it uses 4 different variables that aren't defined, and breaks
the Win32 build
Diffstat (limited to 'win32/sendmail.c')
-rw-r--r-- | win32/sendmail.c | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/win32/sendmail.c b/win32/sendmail.c index fa7203d993..527c17fa05 100644 --- a/win32/sendmail.c +++ b/win32/sendmail.c @@ -214,7 +214,7 @@ int SendText(char *RPath, char *Subject, char *mailTo, char *data, char *headers 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 @@ int SendText(char *RPath, char *Subject, char *mailTo, char *data, char *headers 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); |