<?php
/*use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'vendor/autoload.php'; // Make sure you run `composer require phpmailer/phpmailer`

function sendEmail($toEmail, $toName, $subject, $messageBody) {
    $mail = new PHPMailer(true);

    try {
        // SMTP settings
        $mail->isSMTP();
        $mail->Host       = 'spiritan-edu.org';
        $mail->SMTPAuth   = true;
        $mail->Username   = 'info@spiritan-edu.org';
        $mail->Password   = 'spiritan2025';
        $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // or PHPMailer::ENCRYPTION_STARTTLS
        $mail->Port       = 465; // Use 587 for TLS

        // Sender
        $mail->setFrom('info@spiritan-edu.org', 'SIGSS Admission Office');
        $mail->addAddress($toEmail, $toName);

        // Content
        $mail->isHTML(true);
        $mail->Subject = $subject;
        $mail->Body    = $messageBody;

        $mail->send();
    } catch (Exception $e) {
        error_log("Email Error: {$mail->ErrorInfo}");
    }
}
*/