Php Email Verification Script

Address verifier script allows you to verify users email address using php.


  • Email verification script allows you to verify users email during registration.
  • This script uses to find out the email is valid or not.
  • Address verifier allows you to avoid spam emails.
  • Scripts supports in all modern browsers.
  • It is responsive and user interface.


Email Address Verifier

Enter email to verify :   

Note :We cannot provide the demo version of the script. As If you use the preview of the script frequently, our IP will be blocked. To verify your email address, kindly download and use the script.


function verify_email($email){
return $result;
list($name, $domain)=explode('@',$email);
return $result;
$max_conn_time = 30;
$port = 25;
$max_read_time = 5;
$hosts = array();
$mxweights = array();
getmxrr($domain, $hosts, $mxweights);
$mxs = array_combine($hosts, $mxweights);
asort($mxs, SORT_NUMERIC);

$mxs[$domain] = 100;
$timeout = $max_conn_time / count($mxs);

while(list($host) = each($mxs)) {
#connect to SMTP server
if($fp = fsockopen($host, $port, $errno, $errstr, (float) $timeout)){
stream_set_timeout($fp, $max_read_time);
if($fp) {
$reply = fread($fp, 2082);
preg_match('/^([0-9]{3}) /ims', $reply, $matches);
$code = isset($matches[1]) ? $matches[1] : '';
if($code != '220') {
return $result;
$msg="HELO ".$domain;
fwrite($fp, $msg."\r\n");
$reply = fread($fp, 2082);

$msg="MAIL FROM: <".$name.'@'.$domain.">";
fwrite($fp, $msg."\r\n");
$reply = fread($fp, 2082);

$msg="RCPT TO: <".$name.'@'.$domain.">";
fwrite($fp, $msg."\r\n");
$reply = fread($fp, 2082);

preg_match('/^([0-9]{3}) /ims', $reply, $matches);
$code = isset($matches[1]) ? $matches[1] : '';

if($code == '250') {
}elseif($code == '451' || $code == '452') {
fwrite($fp, $msg."\r\n");
return $result;
$email = "";
echo "<div align='center'><b><font style='color:green;'>Email Verified Successfully!!!</font></b></div>";
echo "<div align='center'><b><font style='color:red;'>Invalid Email Address</font></b></div>";
  • Release Date - 31-08-2015
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to


  • Copy and paste the above code to run the script.
  • Give email address in the php variable "$email".
  • And verify that email address through "verify_email($email) function".
  • Php email verification helps to connect email to SMTP server and fetch the header information whether the given email is exists or not.


Related Scripts

Free Php Scripts

Ask Questions

Ask Question