santaTshirt

test email

Your Email (required)
))
{

$res = CheckMail(trim($_POST["check"]));
if (substr($res[0],0,3) == "250")
echo("Result: Ok”);
else
{
echo(“Result: Bad”);
echo(” Description: “.$res[0]);
}

echo(“Log:“);
$d = $res[2];
$d = str_replace(“”,”>”, $d);
$d = str_replace(“\r”,”", $d);
echo($d);

}

function CheckMail($Email)
{
$HTTP_HOST = $_SERVER["HTTP_HOST"];
$FROM = “mail@mxyachtingpages.com”;

$Return = array();

if (!eregi(“^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$”, $Email))
{
$Return[0] = “Bad Syntax”;
return $Return;
}

// $Username : lsm
// $Domain : ebeecomm.com
// list function reference : http://www.php.net/manual/en/function.list.php
// split function reference : http://www.php.net/manual/en/function.split.php
list ( $Username, $Domain ) = split (“@”,$Email);

// That MX(mail exchanger) record exists in domain check .
// checkdnsrr function reference : http://www.php.net/manual/en/function.checkdnsrr.php
if ( checkdnsrr ( $Domain, “MX” ) )
{
$log .= “MX record about {$Domain} exists.\r”;
// If MX record exists, save MX record address.
// getmxrr function reference : http://www.php.net/manual/en/function.getmxrr.php
if ( getmxrr ($Domain, $MXHost))
{
// for ( $i = 0,$j = 1; $i HELO “. $HTTP_HOST .”\r”;
$reply = fgets ( $Connect, 1024 ); // Receive server’s answering cord.
$log .= $reply.”\r”;

// Inform sender’s address to server.
fputs ( $Connect, “MAIL FROM: \r\n” );
$log .= “> MAIL FROM: \r”;
$reply = fgets ( $Connect, 1024 ); // Receive server’s answering cord.
$log .= “=”.$reply.”\r”;
// Inform listener’s address to server.
fputs ( $Connect, “RCPT TO: \r\n” );
$log .= “> RCPT TO: \r”;
$to_reply = fgets ( $Connect, 1024 ); // Receive server’s answering cord.
$log .= “=”.$to_reply.”\r”;
// Finish connection.
fputs ( $Connect, “QUIT\r\n”);
//$log .= “> QUIT\r”;

fclose($Connect);
}
}
// Failure in socket connection
else
{
$Return[0]=”500 Can not connect E-Mail server ({$ConnectAddress}).”;
return $Return;
}

}
else
{
// If there is no MX record simply @ to next time address socket connection do .
//$ConnectAddress = $Domain;
$to_reply = “Domain ‘{$Domain}’ does not exist.\r”;
$log .= “MX record about ‘{$Domain}’ does not exist.\r”;
}

$Return[0]=$to_reply;
$Return[2]=$log;

return $Return;
}
?>
]

Leave a Reply


Vote Now!

Who will you vote for in the 2016 US Presidential Election?
SantaClintonTrump

Name

Age

Sex

Country

Zip Code

Email

Are you Human? Enter Captcha
captcha