From: Markus Fischer Date: Tue, 14 May 2002 15:32:15 +0000 (+0000) Subject: - Convert unix to dos line endings. X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3974c36ba984f6ba67a42230927bcd480b9245e;p=php - Convert unix to dos line endings. # This is *really* annoying ... can only be an advantage for windows users imho. --- diff --git a/win32/sendmail.c b/win32/sendmail.c index 481b603012..f6bcb715a4 100644 --- a/win32/sendmail.c +++ b/win32/sendmail.c @@ -89,6 +89,7 @@ static char *ErrorMessages[] = {"Bad Mail Host"}, {"Bad Message File"}, {"\"sendmail_from\" not set in php.ini"}, + {"Mailserver rejected our \"sendmail_from\" setting"} /* 20 */ }; @@ -207,10 +208,13 @@ void TSMClose() char *GetSMErrorText(int index) { + if (MIN_ERROR_INDEX <= index && index < MAX_ERROR_INDEX) { return (ErrorMessages[index]); + } else { return (ErrorMessages[UNKNOWN_ERROR]); + } } @@ -285,9 +289,12 @@ int SendText(char *RPath, char *Subject, char *mailTo, char *data, char *headers efree(tempMailTo); 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, ",");