From 387db16217fb998449e3aad73f2ede57259d73d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Feb 2020 13:01:09 +0100 Subject: [PATCH] FIX Filenames must not contains non ascii char or we will get non ascii char into the SMTP header. Conflicts: htdocs/core/class/CMailFile.class.php --- htdocs/core/class/CMailFile.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 2958da93b99..c9dba9a0227 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -123,6 +123,13 @@ class CMailFile { global $conf, $dolibarr_main_data_root; + // Clean values of $mimefilename_list + if (is_array($mimefilename_list)) { + foreach($mimefilename_list as $key => $val) { + $mimefilename_list[$key] = dol_string_unaccent($mimefilename_list[$key]); + } + } + $this->sendcontext = $sendcontext; if (empty($replyto)) $replyto=$from;