cvs: php4 /pear Mail.php /pear/Mail sendmail.php
| From: | Chuck Hagenbuch | Date: | Thu, 02 Nov 2000 20:20:40 +0000 |
| Subject: | cvs: php4 /pear Mail.php /pear/Mail sendmail.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-2430@lists.php.net to get a copy of this message | ||
chagenbu Thu Nov 2 12:20:40 2000 EDT
Modified files:
/php4/pear Mail.php
/php4/pear/Mail sendmail.php
Log:
always prepend Receieved: headers to avoid generating mail that looks like
spam, and remove a silly comment from the sendmail backend.
Index: php4/pear/Mail.php
diff -u php4/pear/Mail.php:1.1 php4/pear/Mail.php:1.2
--- php4/pear/Mail.php:1.1 Wed Oct 25 10:16:08 2000
+++ php4/pear/Mail.php Thu Nov 2 12:20:39 2000
@@ -123,6 +123,11 @@
return false;
}
$text_headers .= $key . ': ' . $val . "\n";
+ } else if ($key == 'Receieved') {
+ // put Received: headers at the top, since Receieved:
+ // after Subject: in the header order is somtimes used
+ // as a spam trap.
+ $text_headers = $key . ': ' . $val . "\n" . $text_headers;
} else {
$text_headers .= $key . ': ' . $val . "\n";
}
Index: php4/pear/Mail/sendmail.php
diff -u php4/pear/Mail/sendmail.php:1.1 php4/pear/Mail/sendmail.php:1.2
--- php4/pear/Mail/sendmail.php:1.1 Wed Oct 25 10:16:08 2000
+++ php4/pear/Mail/sendmail.php Thu Nov 2 12:20:39 2000
@@ -82,7 +82,6 @@
return new PEAR_Error('No from address given');
}
- // Finally, send the mail.
$result = 0;
if (@is_executable($this->sendmail_path)) {
$from = '"' . escapeShellCmd($from) . '"';