diff --git a/src/IMAP/Message.php b/src/IMAP/Message.php index 97acb1e..af55293 100644 --- a/src/IMAP/Message.php +++ b/src/IMAP/Message.php @@ -69,6 +69,7 @@ class Message { * @var array $cc * @var array $bcc * @var array $reply_to + * @var string $in_reply_to * @var array $sender */ public $message_id = ''; @@ -80,6 +81,7 @@ class Message { public $cc = []; public $bcc = []; public $reply_to = []; + public $in_reply_to = ''; public $sender = []; /** @@ -284,6 +286,9 @@ private function parseHeader() { if (property_exists($header, 'reply_to')) { $this->reply_to = $this->parseAddresses($header->reply_to); } + if (property_exists($header, 'in_reply_to')) { + $this->in_reply_to = str_replace(['<', '>'], '', $header->in_reply_to); + } if (property_exists($header, 'sender')) { $this->sender = $this->parseAddresses($header->sender); } @@ -745,6 +750,13 @@ public function getBcc() { public function getReplyTo() { return $this->reply_to; } + + /** + * @return string + */ + public function getInReplyTo() { + return $this->in_reply_to; + } /** * @return array