Merge pull request #14602 from ATM-Consulting/FIX_10.0_wrong_attachment_filenames_in_swiftmailer

FIX 10.0 - when the mime file name is different from the filesystem n…
This commit is contained in:
Laurent Destailleur 2020-09-02 18:12:02 +02:00 committed by GitHub
commit 162da37f1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}