<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

echo "Current Dir: " . __DIR__ . "<br>";

$configPath = '../config.php';
if (file_exists($configPath)) {
    echo "Config found<br>";
    require_once $configPath;
    echo "Config loaded. DB Connection: " . ($conn ? "OK" : "Failed") . "<br>";
} else {
    echo "Config NOT found at $configPath<br>";
}

$smtpPath = '../smtp/PHPMailerAutoload.php';
if (file_exists($smtpPath)) {
    echo "SMTP Loader found<br>";
    require_once $smtpPath;
    if (class_exists('PHPMailer')) {
        echo "PHPMailer class defined<br>";
    } else {
        echo "PHPMailer class NOT defined<br>";
    }
} else {
    echo "SMTP Loader NOT found at $smtpPath<br>";
}
?>
