Req #2100 [Opn->Fbk]: Mail_MimeDecode: doesn't decode forwarded MIME messages

From: Date: Mon, 07 Jun 2010 00:53:44 +0000
Subject: Req #2100 [Opn->Fbk]: Mail_MimeDecode: doesn't decode forwarded MIME messages
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-3891@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=2100&edit=1 ID: 2100 Updated by: daniel.oconnor@gmail.com Reported By: john at curioussymbols dot com Summary: Mail_MimeDecode: doesn't decode forwarded MIME messages -Status: Open +Status: Feedback Type: Feature/Change Request Package: Mail_mimeDecode Operating System: Linux PHP Version: 4.3.5 Roadmap Versions: New Comment: -Status: Open +Status: Feedback What's the actual change request or bug here? Previous Comments: ------------------------------------------------------------------------ [2006-04-27 10:32:36] cipri Moved to Mail_MimeDecode subpackage. ------------------------------------------------------------------------ [2005-09-19 10:02:21] 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 :( ------------------------------------------------------------------------ [2004-12-11 04:13:47] 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. ------------------------------------------------------------------------ [2004-12-10 18:24:16] 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-08-10 01:13:24] 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 www.curioussymbols.com 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 ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=2100&edit=1

« previous php.pear.bugs (#3891) next »