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
include "config.inc.php";
include($config_dir.'/phpmailer.inc.php');
// Setup mailer
if(class_exists('PHPMailer')) {
$mail = new PHPMailer();
} else {
$mail = new PHPMailer\PHPMailer\PHPMailer();
if($CONFIG['verify_email'] == true) {
include($config_dir.'/phpmailer.inc.php');
if(class_exists('PHPMailer')) {
$mail = new PHPMailer();
} else {
$mail = new PHPMailer\PHPMailer\PHPMailer();
}
}
include "head.inc";