Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.12

Bug #8812 user header updates overwritten
Submitted: 2006-09-29 09:19 UTC
From: jbwaters at gmail dot com Assigned: cipri
Status: Closed Package: Mail_Mime (version 1.3.1)
PHP Version: Irrelevant OS: NetBSD
Roadmaps: 1.4.0    
Subscription  


 [2006-09-29 09:19 UTC] jbwaters at gmail dot com (B. Waters)
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.

Comments

 [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.
 [2006-10-18 20:29 UTC] cipri (Cipriano Groenendal)
I agree that the version with this flag set is more logical, but unfortunately I can't just break BC and `fix` that, so for now that flag'lll have to stay. Marked as a duplicate of Bug #2952
 [2007-05-05 15:08 UTC] cipri (Cipriano Groenendal)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/Mail_Mime Fixed in 1.4.0