public function attachmentsHaveApprovedFileExtensions($mappedVars) {

        if ($mappedVars['number_of_attachments'] == 0) {
            return true;
        }

        $approvedFileExtensions = config('lasallecmsemail.inbound_attachments_approved_file_extensions');
        if (empty($approvedFileExtensions)) {
            return true;
        }


        for ($i = 1; $i <= $mappedVars['number_of_attachments']; $i++) {
            $fileExtension = strtolower($mappedVars['attachment-'.$i]->getClientOriginalExtension());

            if (!in_array($fileExtension, $approvedFileExtensions)) {
                return false;
            }
        }

        return true;
    }