PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail_Mime » Bug #687

Not correctly decode 'From:' header field

Details

Submitted2004-02-05 09:39 UTC
Fromxzzzzz at tut dot by
StatusBogus
PackageMail_Mime
PHP Version4.3.4
OSWindows XP, Linux RH7.3
Roadmaps(Not assigned)

Comments

[2004-02-05 09:39 UTC] xzzzzz at tut dot by

Description:
------------
Function Mail_Mime::decode() not correctly decodes 'From: ' header field.

Reproduce code:
---------------
I'm using a qmail program and have such 'From:' header in messages:
From: "=?koi8-r?B?88XNxc7P18neIOHMxcvTwc7E0g==?=" <anybody@somewhere.by>
I'm using such code for decode Mail message:
<?php
$input = file_get_contents($mail_dir.$file);
$decode = new Mail_mimeDecode($input, "\r\n");
$structure = $decode->decode();
?>

Expected result:
----------------
I'm expected to have such object entry:

$structure->headers[from] == "=?koi8-r?B?88XNxc7P18neIOHMxcvTwc7E0g==?=" <anybody@somewhere.by>

Actual result:
--------------
Actual result is:

$structure->headers[from] == "=?koi8-r?B?88XNxc7P18neIOHMxcvTwc7E0g==?="

[2004-02-05 13:28 UTC] xzzzzz at tut dot by

I'm sorry. I'm not attentive. It's working. Sorry.