From c4ed6172a5e25336e0a76140b8e1a75d63c47c2d Mon Sep 17 00:00:00 2001 From: Darren Sim Date: Tue, 4 Oct 2022 00:04:01 +0100 Subject: [PATCH] fix bug in addAttachment with folder's instead of filenames --- src/PHPMailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHPMailer.php b/src/PHPMailer.php index bd604301..8cddd581 100644 --- a/src/PHPMailer.php +++ b/src/PHPMailer.php @@ -1863,7 +1863,7 @@ class PHPMailer if (!static::isPermittedPath($path)) { return false; } - $readable = file_exists($path); + $readable = is_file($path); //If not a UNC path (expected to start with \\), check read permission, see #2069 if (strpos($path, '\\\\') !== 0) { $readable = $readable && is_readable($path);