Skip to content

Commit

Permalink
FIX Filenames must not contains non ascii char or we will get non ascii
Browse files Browse the repository at this point in the history
char into the SMTP header.
  • Loading branch information
eldy committed Feb 6, 2020
1 parent 857c22c commit 13442ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions htdocs/core/class/CMailFile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ public function __construct($subject, $to, $from, $msg, $filename_list = array()
{
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->subject = $subject;
$this->addr_to = $to;
$this->addr_from = $from;
Expand Down

0 comments on commit 13442ef

Please sign in to comment.