diff --git a/src/BluescaleMailApi.php b/src/BluescaleMailApi.php index 5d70882..3a3cfbd 100644 --- a/src/BluescaleMailApi.php +++ b/src/BluescaleMailApi.php @@ -37,7 +37,6 @@ class BluescaleMailApi $notifiable_recipient = false; $notifiable_email = $notifiable->email; $recipients = $template->recipients; - $attachments = $template->attachments; if (count($recipients) > 0) foreach ($recipients as $recipient) @@ -50,27 +49,8 @@ class BluescaleMailApi 'address' => $notifiable->email ]; } - $files = []; - if (count($attachments) > 0) - foreach ($attachments as $attachment) - $files[] = [ - 'name' => $attachment['name'], - 'contents' => $attachment['content'], - 'filename' => $attachment['filename'], - ]; try { - if (count($attachments) > 0) { - return $client->request('post', $url, [ - 'multipart' => $files, - 'form_params' => $template, - 'headers' => [ - 'Authorization' => 'Bearer ' . $this->api_key, - 'Accept' => 'application/json' - ] - ])->getBody(); - } - return $client->request('post', $url, [ 'form_params' => $template, 'headers' => [