From 1aaccd43cb7454d531c9274c972a8c29363342ba Mon Sep 17 00:00:00 2001 From: Maxime Renou Date: Fri, 3 Feb 2023 11:34:22 +0100 Subject: [PATCH] fix: flush recipients --- src/MailTemplate.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MailTemplate.php b/src/MailTemplate.php index 323ecd4..43f8fab 100644 --- a/src/MailTemplate.php +++ b/src/MailTemplate.php @@ -97,7 +97,9 @@ class MailTemplate implements \JsonSerializable */ public function recipients(array $recipients): MailTemplate { - if (!empty($recipients)) { + $this->recipients = []; + + if (! empty($recipients)) { foreach ($recipients as $recipient) { if (!empty($recipient[0]) && is_string($recipient[0])) { $data = [