Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong report #23

Open
GoogleCodeExporter opened this issue Mar 7, 2016 · 1 comment
Open

Wrong report #23

GoogleCodeExporter opened this issue Mar 7, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
$email = '[email protected]';
$SMTP_Validator = new SMTP_validateEmail();
$SMTP_Validator->debug = true;
$results = $SMTP_Validator->validate(array($email));
echo $email.' is '.(isset($results[$email]) ? 'valid' : 'invalid')."\n";

What is the expected output? What do you see instead?
Expected:
[email protected] is invalid

Effective:
Array
(
    [gmail-smtp-in.l.google.com] => 5
    [alt1.gmail-smtp-in.l.google.com] => 10
    [alt2.gmail-smtp-in.l.google.com] => 20
    [alt3.gmail-smtp-in.l.google.com] => 30
    [alt4.gmail-smtp-in.l.google.com] => 40
    [gmail.com] => 0
)
try gmail-smtp-in.l.google.com:25
<<<
220 mx.google.com ESMTP n7si24377456wiy.46
>>>
HELO localhost
<<<
250 mx.google.com at your service
>>>
MAIL FROM: <user@localhost>
<<<
250 2.1.0 OK n7si24377456wiy.46
>>>
RCPT TO: <[email protected]>
<<<
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 
n7si24377456wiy.46
>>>
RSET
<<<
250 2.1.5 Flushed n7si24377456wiy.46
>>>
quit
<<<
221 2.0.0 closing connection n7si24377456wiy.46
[email protected] is valid

What version of the product are you using? On what operating system?
PHP 5.4.4.0
php-smtp-email-validation: Alpha1

Thanks for your work!

Original issue reported on code.google.com by [email protected] on 14 Aug 2012 at 9:00

@GoogleCodeExporter
Copy link
Author

Ok, I understood what the error was, sorry for reporting a wrong issue, still 
it prints unexpected results if the host is wrong, example:

$email = '[email protected]';
$SMTP_Validator = new SMTP_validateEmail();
$SMTP_Validator->debug = true;
$results = $SMTP_Validator->validate(array($email));
echo $email.' is '.($results[$email] ? 'valid' : 'invalid')."\n";

prints

Array
(
    [gadsasddsamail.com] => 0
)
try gadsasddsamail.com:25

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Host 
sconosciuto. in C:\server\htdocs\res\validateEmail.php on line 154

Warning: fsockopen(): unable to connect to gadsasddsamail.com:25 
(php_network_getaddresses: getaddrinfo failed: Host sconosciuto. ) in 
C:\server\htdocs\res\validateEmail.php on line 154

Notice: Undefined index: [email protected] in 
C:\server\htdocs\mailtest.php on line 8
[email protected] is invalid

Original comment by [email protected] on 14 Aug 2012 at 9:09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant