Internal Server Error 500, PHP mail()
I came across this error today and it was not immediately obvious where it lies. In fact if you're using the mail() command, chances are that its been caused by you passing an empty 'to' parameter. For example, the following code with this deliberate mistake would cause the error message to be displayed.
$subject = "test"; $msg = "hello"; mail($to, $subject, $msg); ?>
Another reason can be problems with a .htaccess file somewhere in the path to your script.