I cannot figure out my mistake. Hopefully you guys can help.
$receiver = 'myemail@domain.tld';
$msg = 'some text goes here';
$msg = wordwrap($msg, 70);
$subject = 'Email Test';
$headers = 'From: email@domain.tld' . PHP_EOL .
'Reply-To: email@domain.tld' . PHP_EOL .
'MIME-Version: 1.0' . PHP_EOL .
'Content-Type: text/html; charset=ISO-8859-1';
echo ($receiver . ' ' . $subject . ' ' . $msg . ' ' . $headers);
if(!mail($receiver, $subject, $msg, $headers)){
error_reporting(0);
echo ('<pre>' . date("Y-m-d H:i:s") . ': ');
var_dump (error_get_last());
echo ('<br />');
print_r (error_get_last());
echo ('</pre>');
}else{ /* Redirect to another page */ }
So if i call submit.php i get the following message: 2015-02-24 10:06:50: NULL
I really don't undersand why. no log is filled with errors. I also tried error_reporting(E_ERROR | E_WARNING | E_PARSE); bit it stays null