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; }