Skip to content

Commit ab203a5

Browse files
committed
Method for getting additional header information added
1 parent 2b5c2e6 commit ab203a5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/IMAP/Message.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ class Message {
5252
*/
5353
public $header = null;
5454

55+
/**
56+
* @var null|object $header_info
57+
*/
58+
public $header_info = null;
59+
5560
/**
5661
* Message header components
5762
*
@@ -288,7 +293,23 @@ private function parseHeader() {
288293
}
289294
if (property_exists($header, 'Msgno')) {
290295
$this->message_no = ($this->fetch_options == FT_UID) ? trim($header->Msgno) : imap_msgno($this->client->getConnection(), trim($header->Msgno));
296+
}else{
297+
$this->message_no = imap_msgno($this->client->getConnection(), $this->getUid());
298+
}
299+
}
300+
301+
/**
302+
* Get the current Message header info
303+
*
304+
* @return object
305+
*/
306+
public function getHeaderInfo(){
307+
if($this->header_info == null){
308+
$this->header_info =
309+
$this->header_info = imap_headerinfo($this->client->getConnection(), $this->getMessageNo());;
291310
}
311+
312+
return $this->header_info;
292313
}
293314

294315
/**

0 commit comments

Comments
 (0)