Skip to content

Commit

Permalink
Changed email.inc so that it will look for older version of PHPMailer…
Browse files Browse the repository at this point in the history
… as well as the latest 6.0.x version.
  • Loading branch information
Uplinger committed May 2, 2018
1 parent 7c9b4ad commit 4aa5acb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions html/inc/email.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4aa5acb

Please sign in to comment.