Skip to content

Commit

Permalink
Merge pull request #82 from mrk-j/fix-laravel-9
Browse files Browse the repository at this point in the history
Fix HTML preview for Laravel 9
  • Loading branch information
freekmurze authored Mar 2, 2022
2 parents 8ceefc6 + 70b38fd commit bda627d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PreviewMailTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Symfony\Component\Finder\SplFileInfo;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractTransport;
use Symfony\Component\Mime\MessageConverter;

class PreviewMailTransport extends AbstractTransport
{
Expand Down Expand Up @@ -60,7 +61,7 @@ protected function getHtmlPreviewContent(SentMessage $message): string
{
$messageInfo = $this->getMessageInfo($message);

return $messageInfo . $message->getOriginalMessage()->getBody()->bodyToString();
return $messageInfo . MessageConverter::toEmail($message->getOriginalMessage())->getHtmlBody();
}

protected function getEmlPreviewContent(SentMessage $message): string
Expand Down

0 comments on commit bda627d

Please sign in to comment.