CVS update: php3/win32
| From: | fmk | Date: | Thu, 10 Jun 1999 08:55:58 +0000 |
| Subject: | CVS update: php3/win32 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-6789@lists.php.net to get a copy of this message | ||
Date: Thursday June 10, 1999 @ 4:55
Author: fmk
Update of /repository/php3/win32
In directory php:/tmp/cvs-serv27591/win32
Modified Files:
sendmail.c
Log Message:
updated check on extra headers. only add Date: and From if not supplied by user
Index: php3/win32/sendmail.c
diff -u php3/win32/sendmail.c:1.23 php3/win32/sendmail.c:1.24
--- php3/win32/sendmail.c:1.23 Mon Dec 28 04:44:04 1998
+++ php3/win32/sendmail.c Thu Jun 10 04:55:58 1999
@@ -1,4 +1,4 @@
-/* $Id: sendmail.c,v 1.23 1998/12/28 09:44:04 sas Exp $ */
+/* $Id: sendmail.c,v 1.24 1999/06/10 08:55:58 fmk Exp $ */
/*
* PHP Sendmail for Windows.
@@ -325,19 +325,21 @@
zoneh /= (60 * 60);
zonem = (abs(_timezone) / 60) - (zoneh * 60);
- p += sprintf(p, "Date: %s, %02d %s %04d %02d:%02d:%02d %s%02d%02d\r\n",
- days[tm->tm_wday],
- tm->tm_mday,
- months[tm->tm_mon],
- tm->tm_year + 1900,
- tm->tm_hour,
- tm->tm_min,
- tm->tm_sec,
- (_timezone > 0) ? "+" : (_timezone < 0) ? "-" : "",
- zoneh,
- zonem);
+ if(!xheaders || !strstr(xheaders, "Date:")){
+ p += sprintf(p, "Date: %s, %02d %s %04d %02d:%02d:%02d %s%02d%02d\r\n",
+ days[tm->tm_wday],
+ tm->tm_mday,
+ months[tm->tm_mon],
+ tm->tm_year + 1900,
+ tm->tm_hour,
+ tm->tm_min,
+ tm->tm_sec,
+ (_timezone > 0) ? "+" : (_timezone < 0) ? "-" : "",
+ zoneh,
+ zonem);
+ }
- if(xheaders && strnicmp("From:",xheaders,5)){
+ if(!xheaders || !strstr(xheaders, "From:")){
p += sprintf(p, "From: %s\r\n", RPath);
}
p += sprintf(p, "Subject: %s\r\n", Subject);