Don't try to use phpmailer class if verify_email disabled

This commit is contained in:
Retro_Guy 2021-03-15 01:32:19 -07:00
parent 80f1d1b5c1
commit f5178de66b
1 changed files with 7 additions and 6 deletions

View File

@ -14,13 +14,14 @@ if (file_exists('../common/mods/style.css')) {
<?php <?php
include "config.inc.php"; include "config.inc.php";
include($config_dir.'/phpmailer.inc.php');
// Setup mailer if($CONFIG['verify_email'] == true) {
if(class_exists('PHPMailer')) { include($config_dir.'/phpmailer.inc.php');
$mail = new PHPMailer(); if(class_exists('PHPMailer')) {
} else { $mail = new PHPMailer();
$mail = new PHPMailer\PHPMailer\PHPMailer(); } else {
$mail = new PHPMailer\PHPMailer\PHPMailer();
}
} }
include "head.inc"; include "head.inc";