使用php在实时站点上不使用SMTP_validateEmail

hey My code is working fine on my local server but not working on live site. I used class SMTP_validateEmail.class.php file to implement the email validation. Please help me as soon as possible. What we need to do to execute this.

For invalid email it is working fine but for correct email it is not working fine.

============for smtp_validateEmail.class.php=====

https://code.google.com/p/php-smtp-email-validation/

//===check_mail.php===

<?php

/**
 * Example 1
 * Validate a single Email via SMTP
 */


// include SMTP Email Validation Class

require_once('smtp_validateEmail.class.php');

// the email to validate

$email = $_POST['name'];
// an optional sender

$sender = $_POST['name'];
// instantiate the class

$SMTP_Validator = new SMTP_validateEmail();
// turn on debugging if you want to view the SMTP transaction

//$SMTP_Validator->debug = true;
// do the validation

$results = $SMTP_Validator->validate(array($email), $sender);


// send email?

if ($results[$email]) {
 echo 1; 
} else {
  echo 0; 
}


?>

I faced same issue but I tried to change the $nameserver array values in SMTP_validateEmail.class.php to my web hosting sever's IP address and now it is working fine.

If your server has any other port number for SMTP like Google then replace the existing port number with it.

Hope it will work for you too.