Edit report at http://pear.php.net/bugs/bug.php?id=2100&edit=1

ID: 2100
Updated by: [email protected]
Reported By: john at curioussymbols dot com
Summary: Mail_MimeDecode: doesn't decode forwarded MIME
-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);
$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

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.



[2004-08-10 01:13:24] john at curioussymbols dot com

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

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(
'include_bodies' => $this->_include_bodies
// << END

Around line 570---

function _quotedPrintableDecode($input)
return quoted_printable_decode($input);
// << END


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedJun 7, '10 at 12:00a
activeJun 7, '10 at 12:00a

1 user in discussion

Daniel Oconnor: 1 post



site design / logo © 2023 Grokbase