#24490 [Fbk->Opn]: imap_headerinfo returns only one address in To field
| From: | bob at midnightweb dot net | Date: | Fri, 04 Jul 2003 10:21:24 +0000 |
| Subject: | #24490 [Fbk->Opn]: imap_headerinfo returns only one address in To field | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-43258@lists.php.net to get a copy of this message | ||
ID: 24490
User updated by: bob at midnightweb dot net
Reported By: bob at midnightweb dot net
-Status: Feedback
+Status: Open
Bug Type: IMAP related
Operating System: RedHat Linux 8.0
-PHP Version: 4.3.2
+PHP Version: 4.3.3RC2-dev
New Comment:
I installed the reccommended CVS snapshot, and the To field is still
only populating one address.
Previous Comments:
------------------------------------------------------------------------
[2003-07-04 01:50:20] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-07-03 18:14:00] bob at midnightweb dot net
Description:
------------
The imap_headerinfo() function appears to only return the first address
in the To field of messages that contain more than one address in that
field. Addresses in the Cc field apear to be unaffected by this bug.
I have tried upgrading the C-Client to 2002b-6, and then recompiling
the latest stable PHP release ( 4.3.2 ).
The examples are given with a message with the following To headers:
-- Begin snipit --
From: "Bob" <me@mydomain.com>
To: <user@mydomain.com>, <user2@mydomain.com>,
<user3@mydomain.com>
-- End snipit --
NOTE: The email addresses in this report have been altered to preserve
the privacy of the user.
Reproduce code:
---------------
$mailbox = imap_open($servername.".$cfldr", $username, $password);
$msgheader = @imap_headerinfo($mailbox, $msg);
ob_start();
print_r( $msgheader );
error_log( ob_get_contents() );
ob_end_clean();
Expected result:
----------------
In the error_log of the web server, there should be a print_r output of
the object returned by imap_headerinfo() that looks as follows with the
"to" and "toaddress" elements:
-- Begin assumed snipit --
[toaddress] => "user@mydomain.com" <user@mydomain.com>
[to] => Array
(
[0] => stdClass Object
(
[personal] => user@mydomain.com
[mailbox] => user
[host] => mydomain.com
)
[1] => stdClass Object
(
[personal] => user2@mydomain.com
[mailbox] => user2
[host] => mydomain.com
)
[2] => stdClass Object
(
[personal] => user3@mydomain.com
[mailbox] => user3
[host] => mydomain.com
)
)
-- End assumed snipit --
Actual result:
--------------
There is the print_r output, however with incomplete "to" array and
"toaddress" string elements:
-- Begin snipit --
[toaddress] => "user@mydomain.com" <user@mydomain.com>
[to] => Array
(
[0] => stdClass Object
(
[personal] => user@mydomain.com
[mailbox] => user
[host] => mydomain.com
)
)
-- End snipit --
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24490&edit=1