Skip to content

Commit 624dc77

Browse files
committed
Mixed message header attribute in_reply_to "unified" Webklex#26
1 parent 19affcc commit 624dc77

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Header.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ protected function parse(){
139139
if (property_exists($header, 'subject')) {
140140
$this->attributes["subject"] = $this->decode($header->subject);
141141
}
142+
if (property_exists($header, 'in_reply_to')) {
143+
$this->attributes["in_reply_to"] = is_array($header->in_reply_to) ? $header->in_reply_to : [$header->in_reply_to];
144+
}
142145
if (property_exists($header, 'references')) {
143146
$this->attributes["references"] = $this->decode($header->references);
144147
}
@@ -458,7 +461,7 @@ private function decodeAddresses($values) {
458461
* @param object $header
459462
*/
460463
private function extractAddresses($header) {
461-
foreach(['from', 'to', 'cc', 'bcc', 'reply_to', 'sender', 'in_reply_to'] as $key){
464+
foreach(['from', 'to', 'cc', 'bcc', 'reply_to', 'sender'] as $key){
462465
if (property_exists($header, $key)) {
463466
$this->attributes[$key] = $this->parseAddresses($header->$key);
464467
}

0 commit comments

Comments
 (0)