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

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'auth/mailer/src/PHPMailer.php';
require 'auth/mailer/src/SMTP.php';
require 'auth/mailer/src/Exception.php';

$mail = new PHPMailer(true);

try {
    $mail->isSMTP();
    $mail->Host = 'mail.gobolchain.com';  // Try this first
    $mail->SMTPAuth = true;
    $mail->Username = 'team@gobolchain.com';
    $mail->Password = '@Jibala1997';
    $mail->SMTPSecure = 'ssl';
    $mail->Port = 465;
    
    $mail->SMTPDebug = 2;  // Show debug output
    $mail->Debugoutput = 'html';
    
    $mail->setFrom('team@gobolchain.com', 'Gobolchain');
    $mail->addAddress('your-personal-email@gmail.com');  // Your real email to test
    $mail->Subject = 'Test Email';
    $mail->Body = 'This is a test';
    
    $mail->send();
    echo 'Email sent successfully!';
} catch (Exception $e) {
    echo 'Error: ' . $mail->ErrorInfo;
}
?>