Skip to content

Commit 8844cec

Browse files
committed
wip
1 parent b7b8a13 commit 8844cec

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

src/InboundEmail.php

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,25 @@ public function reply(Mailable $mailable)
129129

130130
public function forward($recipients)
131131
{
132-
return Mail::to($recipients)->send([
133-
'html' => $this->html(),
134-
'text' => $this->text()
135-
]);
132+
return Mail::send([], [], function ($message) use ($recipients) {
133+
$message->to($recipients)
134+
->setBody($this->body());
135+
});
136+
}
137+
138+
public function body()
139+
{
140+
return $this->isHtml() ? $this->html() : $this->text();
141+
}
142+
143+
public function isHtml()
144+
{
145+
return $this->html() !== '';
146+
}
147+
148+
public function isText()
149+
{
150+
return $this->text() !== '';
136151
}
137152

138153
public function isValid(): bool

0 commit comments

Comments
 (0)