Skip to content

Commit 2347795

Browse files
committed
Request: add getReferences method to Message class #83
1 parent fced910 commit 2347795

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ $aMessage = $oFolder->getMessages('ALL', null, false, false);
335335
| getMessageId | | integer | Get the current message ID |
336336
| getMessageNo | | integer | Get the current message number |
337337
| getSubject | | string | Get the current subject |
338+
| getReferences | | mixed | Get any potentially present references |
338339
| getDate | | Carbon | Get the current date object |
339340
| getFrom | | array | Get the current from information |
340341
| getTo | | array | Get the current to information |

src/IMAP/Message.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class Message {
8181
* @var string $message_id
8282
* @var mixed $message_no
8383
* @var string $subject
84+
* @var mixed $references
8485
* @var mixed $date
8586
* @var array $from
8687
* @var array $to
@@ -93,6 +94,7 @@ class Message {
9394
public $message_id = '';
9495
public $message_no = null;
9596
public $subject = '';
97+
public $references = null;
9698
public $date = null;
9799
public $from = [];
98100
public $to = [];
@@ -299,6 +301,9 @@ private function parseHeader() {
299301
if (property_exists($header, 'bcc')) {
300302
$this->bcc = $this->parseAddresses($header->bcc);
301303
}
304+
if (property_exists($header, 'references')) {
305+
$this->references = $header->references;
306+
}
302307

303308
if (property_exists($header, 'reply_to')) {
304309
$this->reply_to = $this->parseAddresses($header->reply_to);
@@ -739,6 +744,13 @@ public function getSubject() {
739744
return $this->subject;
740745
}
741746

747+
/**
748+
* @return mixed
749+
*/
750+
public function getReferences() {
751+
return $this->references;
752+
}
753+
742754
/**
743755
* @return Carbon|null
744756
*/

0 commit comments

Comments
 (0)