From 7a98f99840d3928c39b51abb99046cd4a65dc339 Mon Sep 17 00:00:00 2001 From: Loann Meignant Date: Tue, 9 Jun 2020 13:09:13 +0200 Subject: [PATCH] Modifications --- src/BluescaleMailTemplate.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BluescaleMailTemplate.php b/src/BluescaleMailTemplate.php index 506b93f..4e76b6d 100644 --- a/src/BluescaleMailTemplate.php +++ b/src/BluescaleMailTemplate.php @@ -149,7 +149,10 @@ class BluescaleMailTemplate implements \JsonSerializable */ public function attachments(array $attachments): BluescaleMailTemplate { - $this->attachments = $attachments; + foreach ($attachments as $attachment) { + $this->addAttachment($attachment['path'] ?? $attachment['file'], $attachment['filename'] ?? null); + } + return $this; }