Email Test"; // Check if mail function exists if (!function_exists('mail')) { echo "
Error: mail() function is not available!
"; echo "Make sure PHP is configured with mail support.
"; exit; } // Try to send a test email $to = "monitor@egonetix.de"; $subject = "Test Email from Luftglanz"; $message = "This is a test email sent from " . $_SERVER['SERVER_NAME'] . " at " . date('Y-m-d H:i:s'); $headers = "From: test@" . $_SERVER['SERVER_NAME'] . "\r\n" . "Reply-To: test@" . $_SERVER['SERVER_NAME'] . "\r\n" . "X-Mailer: PHP/" . phpversion(); $success = mail($to, $subject, $message, $headers); if ($success) { echo "Success! Test email was sent to $to
"; } else { echo "Failed to send email. Check server mail configuration.
"; // Check mail configuration echo "";
echo "sendmail_path: " . ini_get('sendmail_path') . "\n";
echo "SMTP: " . ini_get('SMTP') . "\n";
echo "smtp_port: " . ini_get('smtp_port') . "\n";
echo "";
}
// Display PHP info for debugging
echo "PHP Version: " . phpversion() . "
"; echo "Server Software: " . $_SERVER['SERVER_SOFTWARE'] . "
"; ?>