function CheckMail($Email,$Debug=false)
{
global $HTTP_HOST;
if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email))
{
if ($Debug)
echo "Error : {$Email} email format is wrong.
";
return false;
}
if ($Debug)
echo "Confirmation : {$Email} email format is okay.
";
list ( $Username, $Domain ) = split ("@",$Email);
if ( !checkdnsrr ( $Domain, "ANY" ))
{
if ($Debug)
echo "Error : MX record about {$Domain} does not exist.
";
return false;
}
if($Debug)
echo "Confirmation : MX record about {$Domain} exists.
";
return true;
}
?>
$ShowForm = "Yes";
if ($_POST["submit"])
{
$Name = trim($_POST["Name"]);
$Phone = trim($_POST["Phone"]);
$Email = trim($_POST["Email"]);
$Interested = trim($_POST["Interested"]);
$Valid = 1;
if (!CheckMail($Email) && strlen($Phone < 8))
{
echo "