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

echo "Testing PHP mail function...<br>";

$to = "rxaero.mro@gmail.com";
$subject = "Test Email";
$message = "This is a test email from your server.";
$headers = "From: test@yourdomain.com";

if(mail($to, $subject, $message, $headers)) {
    echo "✅ Mail function executed. Check your inbox/spam.";
} else {
    echo "❌ Mail function failed. Your hosting may have disabled mail().";
}

echo "<br><br>Server info:<br>";
echo "SMTP: " . ini_get('SMTP') . "<br>";
echo "smtp_port: " . ini_get('smtp_port') . "<br>";
?>