This is a test email from SemapForm PHP %s XML; $testXML = sprintf($testXML, date('Y-m-d H:i:s')); $subject = "SemapForm Test Email - " . date('Y-m-d H:i:s'); echo "Attempting to send test email...\n"; echo "Subject: {$subject}\n\n"; $result = sendEmail($subject, $testXML); if ($result) { echo "\n✓ Email sent successfully!\n"; echo "Check the recipient inbox and mail.log for details.\n"; } else { echo "\n✗ Email sending failed!\n"; echo "Check mail.log for error details.\n"; } echo "\n=== Log File Contents ===\n\n"; if (file_exists(LOG_FILE)) { echo "Last 20 lines of mail.log:\n"; echo "----------------------------------------\n"; $lines = file(LOG_FILE); $lastLines = array_slice($lines, -20); echo implode('', $lastLines); } else { echo "Log file not found at: " . LOG_FILE . "\n"; }