data->subject), replyTo: [ new Address( $this->data->email, $this->data->firstName . ' ' . $this->data->lastName ), ], ); } /** * Get the message content definition. */ public function content(): Content { return new Content( markdown: 'emails.send-contact', ); } /** * Get the attachments for the message. * * @return \Illuminate\Mail\Mailables\Attachment[] */ public function attachments(): array { if ($this->data->file === null) { return []; } $extension = pathinfo($this->data->file->originalName, PATHINFO_EXTENSION); $joinedFileName = sprintf( 'BOUTIQUE_MESSAGE-PJ-%s.%s', date('YmdHis'), $extension ); $disk = app()->make(PrivateS3Disk::class)->disk->value; return [ Attachment::fromStorageDisk($disk, $this->data->file->path) ->as($joinedFileName) ->withMime($this->data->file->mimeType), ]; } }