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

Request #2100 Mail_MimeDecode: doesn't decode forwarded MIME messages
Submitted: 2004-08-10 05:13 UTC
From: john at curioussymbols dot com Assigned:
Status: No Feedback Package: Mail_mimeDecode
PHP Version: 4.3.5 OS: Linux
Roadmaps: (Not assigned)    
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
2011-09-29 14:01 UTC
Bug Type:
From: john at curioussymbols dot com
New email:
PHP Version: Package Version: OS:


 [2004-08-10 05:13 UTC] john at curioussymbols dot com
Description: ------------ The latest version 1.2.1 of mimeDecode doesn't correctly decode forwarded mime messages, even if you set the '_decode_headers' option. I think the problem is around line 300. I made changes as shown in 'reproduce code' which fixed the problem. Maybe there's reason not to decode forwarded messages... if that's the case maybe it would be better as another option to set when calling 'decode()'. I made another change as well, to use the built-in 'quoted_printable_decode' if it exists. Thanks for the great code! John Pye (PS if you want to acknowledge me then please use my web address rather than my email address, coz I've been getting spam following another PEAR listing). Reproduce code: --------------- Around line 300--- case 'message/rfc822': $obj = &new Mail_mimeDecode($body); $return->parts[] = $obj->decode( array( 'include_bodies' => $this->_include_bodies // ADD THE FOLLOWING << ,'decode_bodies'=>$this->_decode_bodies // << END ) ); unset($obj); break; Around line 570--- function _quotedPrintableDecode($input) { // ADD THE FOLLOWING << if(function_exists('quoted_printable_decode')){ return quoted_printable_decode($input); } // << END


 [2004-12-10 23:24 UTC] sean
Could you please provide a message source or an email where this happens. I suspect you're just trying to decode nested mails (attachment of an encoded email). If this is the case, this can be solved with multiple calls to decode(), and this is normal behaviour. As for your other "patch", please include only one issue per bug report. Feel free to open another. S
 [2004-12-11 09:13 UTC] john at curioussymbols dot com
Maybe I should have called it a feature request. As the parameters were described, I expected the 'decode_headers' config option to be recursive. That is, if the 'include_bodies' option is recursive, as it is, then the other options should be as well, don't you think? Either that, or there should be an option that lets sub-part bodies/headers be decoded at will. I want to be able to do it in a single pass if possible, so that I can then just do an array traversal and store all the parts and sub-parts of a received email into a database.
 [2005-09-19 14:02 UTC] cm at data-consult dot de
i have exactly the same problem and i dont know how to solve this. i've cutted my multipart message into pieces, but how can i decode() that $part again? i've tried: $params['input'] = $part; $structure = Mail_mimeDecode::decode($params); and $structure = Mail_mimeDecode::decode($part); but both gives me an error. please help im totally stuck here :(
 [2006-04-27 14:32 UTC] cipri (Cipriano Groenendal)
Moved to Mail_MimeDecode subpackage.
 [2010-06-07 04:53 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
What's the actual change request or bug here?
 [2011-09-29 14:01 UTC] doconnor (Daniel O'Connor)
-Status: Feedback +Status: No Feedback -Roadmap Versions: 1.6.0 +Roadmap Versions: