Skip to content

Commit

Permalink
Merge pull request #1 from exonet/trizz&fan-patch-1
Browse files Browse the repository at this point in the history
Make it possible to get the raw message
  • Loading branch information
rsplithof authored Jan 13, 2017
2 parents b193974 + 9f9f2ce commit 756095d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,16 @@ public function keepUnseen($bool = true)

return $this;
}

/**
* Get the raw message, including all headers, parts, etc. unencoded and unparsed.
*
* @return string The raw message.
*/
public function getRaw()
{
return imap_fetchbody($this->stream, imap_msgno($this->stream, $this->messageNumber), "");
}

/**
* Load message structure
Expand Down

0 comments on commit 756095d

Please sign in to comment.