使用 PHP IMAP,我可以从 gmail 下载我所有的邮件附件等。但是,当收件人地址中有多个收件人时,我只会得到一个地址。让我更清楚地解释一下。
假设我有一个电子邮件地址 example@gmail.com,我从那里下载所有消息。现在,当 test@gmail.com 向我发送电子邮件时,我使用函数 imap_headerinfo 在 toaddress 中获取 example@gmail.com。但是当 test@gmail.com 将邮件发送到 example@gmail.com 和 example_1@gmail.com 时,我没有在 toaddress 或 reply_toaddress 或 cc 等中收到这个 example_1@gmail.com。下面是我的消息输出示例
$header = imap_headerinfo($mbox, $msgno);
stdClass Object
(
[date] => Tue, 10 Sep 2013 13:37:49 +0530
[Date] => Tue, 10 Sep 2013 13:37:49 +0530
[subject] => reply all test
[Subject] => reply all test
[message_id] => <CACYeE9OEr+9z-Q5BR69sC=nJR_qQps69-VKWxkL6j2hqKEBo2w@mail.gmail.com>
[toaddress] => example@gmail.com
[to] => Array
(
[0] => stdClass Object
(
[mailbox] => example
[host] => gmail.com
)
)
[fromaddress] => Test <test@gmail.com>
[from] => Array
(
[0] => stdClass Object
(
[personal] => Test
[mailbox] => test
[host] => gmail.com
)
)
[reply_toaddress] => Test <test@gmail.com>
[reply_to] => Array
(
[0] => stdClass Object
(
[personal] => Test
[mailbox] => test
[host] => gmail.com
)
)
[senderaddress] => Test <test@gmail.com>
[sender] => Array
(
[0] => stdClass Object
(
[personal] => Test
[mailbox] => test
[host] => gmail.com
)
)
[Recent] =>
[Unseen] => U
[Flagged] =>
[Answered] =>
[Deleted] =>
[Draft] =>
[Msgno] => 34463
[MailDate] => 10-Sep-2013 08:07:00 +0000
[Size] => 2609
[udate] => 1378800420
)
我想要所有收件人的地址,以便我可以使用它们来回复所有人。
当我点击全部回复时,我可以清楚地看到 Outlook、Thunderbird 等电子邮件客户端中的所有收件人地址 (AS Cc)。