From 3f316839092d281db75d0be80c35d8cdf9c07546 Mon Sep 17 00:00:00 2001 From: Louis Jeckel Date: Thu, 8 Oct 2020 09:58:21 +0200 Subject: [PATCH] Update BatchMail.php --- app/Mail/BatchMail.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Mail/BatchMail.php b/app/Mail/BatchMail.php index 40bdbbe..69a05fe 100644 --- a/app/Mail/BatchMail.php +++ b/app/Mail/BatchMail.php @@ -49,12 +49,17 @@ class BatchMail extends Mailable public function __construct($content, $subject, $type, $link = null, $image = null) { // - $this->content = preg_replace('/subject = $subject; $this->link = $link; $this->image = $image; + $this->emailView = Arr::get($this->viewMap, $type ?? 0); + + $this->content = $this->emailView === 'batch-pdf' ? + (Html2Markdown::convert($content)) : + preg_replace('/emailView === null) { throw new \InvalidArgumentException('Invalid email type !'); } -- 2.39.5