Skip to content

Commit 96feaa2

Browse files
authored
Add visibleText method
1 parent 4e70651 commit 96feaa2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/InboundEmail.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace BeyondCode\Mailbox;
44

55
use Carbon\Carbon;
6+
use EmailReplyParser\EmailReplyParser;
67
use Illuminate\Support\Collection;
78
use Illuminate\Support\Facades\Mail;
89
use Illuminate\Contracts\Mail\Mailable;
@@ -54,6 +55,11 @@ public function text(): ?string
5455
return $this->message()->getTextContent();
5556
}
5657

58+
public function visibleText(): ?string
59+
{
60+
return EmailReplyParser::parseReply($this->text());
61+
}
62+
5763
public function html(): ?string
5864
{
5965
return $this->message()->getHtmlContent();

0 commit comments

Comments
 (0)