Home » Mail » Mail_mimeDecode » Bug #5730
Mail_MimeDecode: Incorrect Mail decode - no body
Details
| Submitted | 2005-10-20 09:44 UTC |
|---|---|
| From | nicolas at isaveurs dot com |
| Status | Suspended |
| Package | Mail_mimeDecode |
| PHP Version | 5.0.5 |
| Roadmaps | 1.6.0 |
Comments
[2005-10-20 09:44 UTC] nicolas at isaveurs dot com
Description:
------------
Incorrect Mail Decode.
Decoder unable to give back the body of a multipart mail message when there is only one part.
Test script:
---------------
$thisMessage=file_get_contents('http://www.isaveurs.com/tmp/tst.html');
$params['include_bodies'] = TRUE;
$params['decode_bodies'] = TRUE;
$params['decode_headers'] = TRUE;
$decoder = new Mail_mimeDecode($thisMessage);
$messStruct = $decoder->decode($params);
// messStruct will have no parts[].
?? Patch ??
line 503 in mimeDecode::_boundarySplit
for ($i = 1; $i < count($tmp)-1 ; $i++) {
should be
for ($i = 1; $i < count($tmp) ; $i++) {
Clearly, it works with this code in this special case - haven't tested it with other mails samples to see any side effect.
Expected result:
----------------
$messStruct should have one parts[].
Actual result:
--------------
messStruct will has no parts[].