From 134a47a93f2b97356627a6f332f43ee2c1f8229a Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Tue, 1 Sep 2020 15:36:35 +0200 Subject: [PATCH] FIX 10.0 - when the mime file name is different from the filesystem name, the attachment name should be the mime filename --- htdocs/core/class/CMailFile.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 853f2f98b05..7c12f4f9d5b 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -463,6 +463,9 @@ class CMailFile { //$this->message->attach(Swift_Attachment::fromPath($filename_list[$i],$mimetype_list[$i])); $attachment = Swift_Attachment::fromPath($filename_list[$i], $mimetype_list[$i]); + if (!empty($mimefilename_list[$i])) { + $attachment->setFilename($mimefilename_list[$i]); + } $this->message->attach($attachment); } }