From 40a127424eb65b4d804a1af2a97ed4429c1172b1 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 19 Mar 2022 13:18:20 +0100 Subject: [PATCH] Include PHPMailer Exception in pwg_mail() Otherwise if an exception is to be thrown it results in Fatal error: Uncaught Error: Class 'PHPMailer\PHPMailer\Exception' not found See https://piwigo.org/forum/viewtopic.php?id=31942 --- include/functions_mail.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php index 2ca309d17..c99cd266a 100644 --- a/include/functions_mail.inc.php +++ b/include/functions_mail.inc.php @@ -606,6 +606,7 @@ function pwg_mail($to, $args=array(), $tpl=array()) $conf_mail = get_mail_configuration(); } + include_once(PHPWG_ROOT_PATH.'include/phpmailer/Exception.php'); include_once(PHPWG_ROOT_PATH.'include/phpmailer/SMTP.php'); include_once(PHPWG_ROOT_PATH.'include/phpmailer/PHPMailer.php');