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;
}
?>