kakalos12 / php-smtp-email-validation

Automatically exported from code.google.com/p/php-smtp-email-validation
0 stars 0 forks source link

Error when you try valid invalid "domain name". #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to valid an invalid domain name exp. "test@test-test.com"

What is the expected output? What do you see instead?
PHP Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: No 
host

What version of the product are you using? On what operating system?
Last

Please provide any additional information below.
Error at:

       if ($this->sock = fsockopen($host, $this->port, $errno, 
$errstr, (float) $timeout)) {
        stream_set_timeout($this->sock, $this->max_read_time);
        break;
       }

Original issue reported on code.google.com by studiofaca on 24 Jan 2010 at 12:27

GoogleCodeExporter commented 8 years ago
I confirmed this.  If DNS doesn't know the host, that's good enough for me.  So 
I
added the following code (just below where you mention):

} else {

    // TONE
    if ( strpos ( $errstr, "No such host is known" ) ) {
        foreach($users as $user) {
            $results[$user.'@'.$domain] = false;
        }
    }

}

Original comment by Tone.Ga...@gmail.com on 26 Feb 2010 at 6:51

GoogleCodeExporter commented 8 years ago
Could you please paste the patch with some context? It's not clear for me where 
to include it, thanks!

Original comment by akosgabr...@gmail.com on 7 Apr 2013 at 1:31