Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow get raw unparsed message (with all headers and body) #202

Open
Koc opened this issue Nov 23, 2017 · 1 comment
Open

Allow get raw unparsed message (with all headers and body) #202

Koc opened this issue Nov 23, 2017 · 1 comment

Comments

@Koc
Copy link

Koc commented Nov 23, 2017

Please implement Message::__toString() which returns unparsed email

@drjayvee
Copy link

drjayvee commented Mar 2, 2022

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)
	;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants