note 30792 added to function.error-log
| From: | php-general at lists dot php dot net | Date: | Fri, 28 Mar 2003 20:14:56 +0000 |
| Subject: | note 30792 added to function.error-log | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45959@lists.php.net to get a copy of this message | ||
when using error_log to send email, not all elements of an extra_headers string are handled the same
way. "From: " and "Reply-To: " header values will replace the default header
values. "Subject: " header values won't: they are *added* to the mail header but
don't replace the default, leading to mail messages with two Subject fields.
<?php
error_log("sometext", 1, "zigzag@my.domain",
"Subject: Foo\nFrom: Rizzlas@my.domain\n");
?>
---------------%<-----------------------
To: zigzag@my.domain
Envelope-to: zigzag@my.domain
Date: Fri, 28 Mar 2003 13:29:02 -0500
From: Rizzlas@my.domain
Subject: PHP error_log message
Subject: Foo
Delivery-date: Fri, 28 Mar 2003 13:29:03 -0500
sometext
---------------%<---------------------
quoth the docs: "This message type uses the same internal function as mail() does."
mail() will also fail to set a Subject field based on extra_header data - instead it takes a
seperate argument to specify a "Subject: " string.
php v.4.2.3, SunOS 5.8
--
http://www.php.net/manual/en/function.error-log.php
http://master.php.net/manage/user-notes.php?action=edit+30792
http://master.php.net/manage/user-notes.php?action=delete+30792
http://master.php.net/manage/user-notes.php?action=reject+30792