From 726f1986eb9cb87f72c6a2850dbc5e1d52d2f4ac Mon Sep 17 00:00:00 2001 From: Jesper Kold-Hansen Date: Mon, 11 Nov 2019 09:52:06 +0100 Subject: [PATCH] Removed empty merge vars. --- src/MandrillTemplateChannel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MandrillTemplateChannel.php b/src/MandrillTemplateChannel.php index 401cf62..ace9b37 100644 --- a/src/MandrillTemplateChannel.php +++ b/src/MandrillTemplateChannel.php @@ -49,7 +49,7 @@ public function send($notifiable, Notification $notification): void ->setFromEmail($fromAddress ?? config('mail.from.address')) ->setFromName($fromName ?? config('mail.from.name')) ->addHeader('Reply-To', "$replyToName <$replyToAddress>") - ->setMergeVars($templateMessage->toArray()); + ->setMergeVars(array_filter_recursive($templateMessage->toArray())); foreach ($templateMessage->recipients as $entry) { list ($email, $name, $type) = $entry;