Only one recipients visible in TO header
Headers CC, BCC are correctly, but TO header include only one recipients
This is part of header message and dump IncomingMessage object
BCC: [email protected], [email protected] From: AppTest [email protected] Subject: =?UTF-8?B?dW5pdF90ZXN0X3NlbmQxX8SZxJjDs8OTxIXEhMWbxZrFgsWBxbzFu8W6?= =?UTF-8?B?xbnEh8SGxYTFgw==?= To: example1 [email protected], [email protected] Cc: [email protected], [email protected] Reply-To: [email protected], [email protected] Message-ID: [email protected] Date: Thu, 6 Apr 2017 00:37:21 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------317B09975AAF7083304CA518"
This is a multi-part message in MIME format. --------------317B09975AAF7083304CA518
SSilence\ImapClient\IncomingMessage Object
(
[header] => stdClass Object
(
[subject] => unit_test_send1_ęĘóÓąĄśŚłŁżŻźŹćĆńŃ
[from] => AppTest <[email protected]>
[to] => example1 <[email protected]>
[date] => Thu, 6 Apr 2017 00:37:21 +0200
[message_id] => <[email protected]>
[size] => 5546
[uid] => 45
[msgno] => 1
[recent] => 0
[flagged] => 0
[answered] => 0
[deleted] => 0
[seen] => 1
[draft] => 0
[udate] => 1491431842
[details] => stdClass Object
(
[date] => Thu, 6 Apr 2017 00:37:21 +0200
[Date] => Thu, 6 Apr 2017 00:37:21 +0200
[subject] => unit_test_send1_ęĘóÓąĄśŚłŁżŻźŹćĆńŃ
[Subject] => unit_test_send1_ęĘóÓąĄśŚłŁżŻźŹćĆńŃ
[message_id] => <[email protected]>
[toaddress] => example1 <[email protected]>
[to] => Array
(
[0] => stdClass Object
(
[personal] => example1
[mailbox] => abc
[host] => example1
)
)
[fromaddress] => AppTest <[email protected]>
[from] => Array
(
[0] => stdClass Object
(
[personal] => AppTest
[mailbox] => test
[host] => example.com
)
)
[ccaddress] => [email protected], [email protected]
[cc] => Array
(
[0] => stdClass Object
(
[mailbox] => cc1
[host] => example1.pl
)
[1] => stdClass Object
(
[mailbox] => cc2
[host] => example1.pl
)
)
[bccaddress] => [email protected], [email protected]
[bcc] => Array
(
[0] => stdClass Object
(
[mailbox] => bcc2
[host] => example1.pl
)
[1] => stdClass Object
(
[mailbox] => bcc1
[host] => example1.pl
)
)
[reply_toaddress] => ....
[reply_to] => Array
(
...
)
[senderaddress] => AppTest <[email protected]>
[sender] => Array
(
[0] => stdClass Object
(
[personal] => AppTest
[mailbox] => test
[host] => example.com
)
)
[Recent] =>
[Unseen] =>
[Flagged] =>
[Answered] =>
[Deleted] =>
[Draft] =>
[Msgno] => 1
[MailDate] => 5-Apr-2017 22:37:22 +0000
[Size] => 5546
[udate] => 1491431842
)
)
This may be an issue with some old code. Just got a pc so I'll be working on this
any solutions?
Got back yesterday. I will look at today as soon as I get out of bed...
I haven't seen the code in a bit, try a temporary downgrade and tell me if it ever worked in the first place
How can I downgrade and to which version? I use composer
"require": {
"ssilence/php-imap-client": "dev-master"
},
Hello. How can i solve this issue?
This issue is solved by changing the following:
ImapClient.php
public function imapHeaderInfo($id)
{
return imap_headerinfo($this->imap, $id);
}
change into:
public function imapHeaderInfo($id)
{
return imap_rfc822_parse_headers(imap_fetchheader($this->imap, $id));
}
IncomingMessage.php
protected function imapHeaderInfo()
{
return imap_headerinfo($this->imapStream, $this->id);
}
change into:
protected function imapHeaderInfo()
{
return imap_rfc822_parse_headers(imap_fetchheader(($this->imapStream, $this->id));
}
See: * see: http://php.net/manual/en/function.imap-headerinfo.php#98809
Hello. We accept all help @Daxyhr. However to properly credit you you need to submit a pull request with these changes
@xXXIMMATTHEWXXx I'm trying to figure out how that works. Thats why I just posted the solution here. I just pointed to a solution that I found online when I runned into the issue above.
[update] I think I made a pull request now.