Home » Mail » Mail_Mime » Bug #8812
user header updates overwritten
Details
| Submitted | 2006-09-29 09:19 UTC |
|---|---|
| From | jbwaters at gmail dot com |
| Assigned | cipri |
| Status | Closed |
| Package | Mail_Mime |
| PHP Version | Irrelevant |
| OS | NetBSD |
| Roadmaps | 1.4.0 |
Comments
[2006-09-29 09:19 UTC] jbwaters at gmail dot com
Description:
------------
When you create a mime message and then want to email it to a few people as seperate messges they later get the first person emailed to's headers. So all see for example the email as being To: first@example.net
Test script:
---------------
If you really need code to show this I can dig it out, but
intead for now I will put the fix.
In Mail/mime.php change in the headers function:
$this->_headers = array_merge($headers, $this->_headers)
to
$this->_headers = array_merge($this->_headers,$headers);
to keep user change to headers such as To: instead of overwritting them with the old values.
[2006-09-30 03:17 UTC] jbwaters at gmail dot com
Ok, I found code in cvs that adds an optional overide flag. I want to suggest though this should just be the behavior, this is a programming api not a user utility, so we should be able to assume that if the program sets a header explictly they want that header... this gets rids of an uneeded param, and keeps the code cleaner, and it seems no need to be a flag.