diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 29ccbde0f02..96c99ebba36 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -319,6 +319,10 @@ class FormMail extends Form // phpcs:enable global $conf, $langs, $user, $hookmanager, $form; + // Required to show preview of mail attachments + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + $formfile = new Formfile($this->db); + if (!is_object($form)) $form = new Form($this->db); // Load translation files required by the page @@ -845,7 +849,10 @@ class FormMail extends Form foreach ($listofpaths as $key => $val) { $out .= '