ID:               26912
 User updated by:  lars at kneschke dot de
 Reported By:      lars at kneschke dot de
 Status:           Bogus
 Bug Type:         IMAP related
 Operating System: Gentoo
 PHP Version:      4.3.4
 New Comment:

I did fear that...

Thanks!


Previous Comments:
------------------------------------------------------------------------

[2004-01-14 19:37:56] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

If this is a bug then it's a bug in the imap library. The 
PHP function is not much more then a wrapper around an imap 
function which actually does the address parsing. 

------------------------------------------------------------------------

[2004-01-14 19:03:11] lars at kneschke dot de

Description:
------------
imap_rfc822_parse_adrlist fails when it should decode emailadresses
using following format

[EMAIL PROTECTED] <[EMAIL PROTECTED]>

It gets confused by the first @ .

Changing the string to

[EMAIL PROTECTED] <[EMAIL PROTECTED]>

makes it working.

Reproduce code:
---------------
$testSting = "[EMAIL PROTECTED] <[EMAIL PROTECTED]>";
print "<pre>";
print_r(imap_rfc822_parse_adrlist($testString,''));
print "</pre>";

Expected result:
----------------
Array
(
    [0] => stdClass Object
        (
            [mailbox] => test2
            [host] => lists.net
            [personal] => [EMAIL PROTECTED]
        )

)

Actual result:
--------------
Array
(
    [0] => stdClass Object
        (
            [mailbox] => test1
            [host] => lists.net
        )

    [1] => stdClass Object
        (
            [mailbox] => UNEXPECTED_DATA_AFTER_ADDRESS
            [host] => .SYNTAX-ERROR.
        )

)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26912&edit=1

Reply via email to