data['subject'], tags: [$this->data['company_key']], replyTo: $this->data['reply_to'], from: $this->data['from'], to: $this->data['to'], bcc: $this->data['bcc'] ); } /** * Get the message content definition. * * @return \Illuminate\Mail\Mailables\Content */ public function content() { return new Content( view: 'email.template.client', text: 'email.template.text', with: [ 'text_body' => $this->data['body'], 'body' => $this->data['body'], 'settings' => $this->data['settings'], 'whitelabel' => $this->data['whitelabel'], 'logo' => $this->data['logo'], 'signature' => $this->data['signature'], 'company' => $this->data['company'], 'greeting' => $this->data['greeting'], ] ); } /** * Get the attachments for the message. * * @return array */ public function attachments() { $array_of_attachments = []; foreach ($this->data['attachments'] as $attachment) { $array_of_attachments[] = Attachment::fromData(fn () => base64_decode($attachment['file']), $attachment['name']) ->withMime('application/pdf'); } return $array_of_attachments; } }