I'm attempting to check if an exists but false is always returned even though my email address exists.
function EmailValidation($email)
 { 
    $email = htmlspecialchars(stripslashes(strip_tags($email))); //parse unnecessary characters to prevent exploits
    if (filter_var($email, FILTER_VALIDATE_EMAIL)) 
    { //checks to make sure the email address is in a valid format
    $domain = explode( "@", $email ); //get the domain name
        if ( @fsockopen ($email,80,$errno,$errstr,3)) 
        {
            //if the connection can be established, the email address is probably valid
            return "yes";
        } else 
        {
            return "no"; //if a connection cannot be established return false
        }
    //return "not valid"; //if email address is an invalid format return false
  }
}
 $ve = EmailValidation("myemail@gmail.com");
print_r($ve);
I have 500k emails, i've been given the task to find out, which emails exist and which don't. I don't want to send an email but check if the email is exist. How do i solve?
 
    