|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-07-27 14:53 UTC] arun dot magzion at gmail dot com
Description:
------------
THe imap_header funtion return the multiple email address for cc, bcc but not with the to email address.
Reproduce code:
---------------
$ccbcc = imap_header($mbox,$msgid);
if(isset($ccbcc->to)){
$to = "";
foreach($ccbcc->to as $mto) {
if(isset($mto->personal)) {
$to = $to. $mto->personal;
}
if(isset($mto->mailbox) && isset($mto->host)) {
$to = $to."< ".$mto->mailbox."@".$mto->host." >". ",";
}
}
$to = substr($to, 0,strlen($to)-1);
}
Expected result:
----------------
info@magzion.com, info@grafotech.org
Actual result:
--------------
info@magzion.com
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 20:00:01 2025 UTC |
Dear Team, Consider this example, I sent email to 3 different email address and cc'ed to another different two email address. When I tried to receive all the email address using imap_header i got the 2 cc'ed email address but not the 3 to address with the same loop and functions. Please find the output for $ccbcc = imap_header($mbox,$msgid); print_r($ccbcc); Here Iam getting the expected output for cc but not with the to address whereas the same is fine with Gmail. stdClass Object ( [date] => Sun, 27 Jul 2008 21:04:37 +0530 [Date] => Sun, 27 Jul 2008 21:04:37 +0530 [subject] => Testing for multiple email address [Subject] => Testing for multiple email address [message_id] => <9bfeef6e0807270834t58af4da7v907d2fa51a95c316@mail.gmail.com> [toaddress] => info@grafotech.org [to] => Array ( [0] => stdClass Object ( [mailbox] => info [host] => grafotech.org ) ) [fromaddress] => Arunkumar Vijayakumar <arun.magzion@gmail.com> [from] => Array ( [0] => stdClass Object ( [personal] => Arunkumar Vijayakumar [mailbox] => arun.magzion [host] => gmail.com ) ) [ccaddress] => mohan@grafotech.org, arun.magzion@gmail.com [cc] => Array ( [0] => stdClass Object ( [mailbox] => mohan [host] => grafotech.org ) [1] => stdClass Object ( [mailbox] => arun.magzion [host] => gmail.com ) ) [reply_toaddress] => Arunkumar Vijayakumar <arun.magzion@gmail.com> [reply_to] => Array ( [0] => stdClass Object ( [personal] => Arunkumar Vijayakumar [mailbox] => arun.magzion [host] => gmail.com ) ) [senderaddress] => Arunkumar Vijayakumar <arun.magzion@gmail.com><title>Grafotech(R) Magzion Mail</title> [sender] => Array ( [0] => stdClass Object ( [personal] => Arunkumar Vijayakumar [mailbox] => arun.magzion [host] => gmail.com ) ) [Recent] => [Unseen] => [Flagged] => [Answered] => [Deleted] => [Draft] => [Msgno] => 42 [MailDate] => 27-Jul-2008 10:34:55 -0500 [Size] => 2331 [udate] => 1217172895 )