From 4aa5acbc45f9e95197e3dd486bb1d8f2d8399790 Mon Sep 17 00:00:00 2001 From: Keith Uplinger Date: Wed, 2 May 2018 13:36:16 -0500 Subject: [PATCH] Changed email.inc so that it will look for older version of PHPMailer as well as the latest 6.0.x version. --- html/inc/email.inc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/html/inc/email.inc b/html/inc/email.inc index 6a7a4a84a9..ddd6bf6a6b 100644 --- a/html/inc/email.inc +++ b/html/inc/email.inc @@ -27,8 +27,15 @@ require_once("../inc/token.inc"); // function send_email($user, $subject, $body, $body_html=null, $email_addr=null) { if (function_exists("make_php_mailer")) { - require_once("../inc/PHPMailer/src/PHPMailer.php"); - require_once("../inc/PHPMailer/src/SMTP.php"); + if(file_exists("../inc/PHPMailer/src/PHPMailer.php") && file_exists("../inc/PHPMailer/src/SMTP.php")) { + require_once("../inc/PHPMailer/src/PHPMailer.php"); + require_once("../inc/PHPMailer/src/SMTP.php"); + } else if (file_exists("../inc/phpmailer/class.phpmailer.php")) { + require_once("../inc/phpmailer/class.phpmailer.php"); + } else { + echo "PHPMailer not installed"; + return false; + } $mail = make_php_mailer(); if($email_addr) { $mail->AddAddress($email_addr, $user->name);