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)    
Subscription  


 [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 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

Comments

 [2004-12-10 23:24 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2010-06-07 04:53 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2011-09-29 14:01 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!