Fetch
Fetch copied to clipboard
Allow get raw unparsed message (with all headers and body)
Please implement Message::__toString() which returns unparsed email
According to this StackOverflow post, it should be as simple as
public function __toString()
{
$imap = $this->imapConnection->getImapStream();
return imap_fetchheader($imap, $this->uid, FT_PREFETCHTEXT) .
"\n" .
imap_body($imap, $this->uid)
;
}