Mail check

I often bump into people who claim their mail isn't working in php scripts. The first thing I do is chuck this script in and see what happens...

<?php
$to = "info@domain.com";
$from = "info@domain.com";
$result = mail($to, "Mail test", 'Mail test', "From: $from" );
echo "The result is : $result (1=good, 0=bad)";
?>

Tags: