0

i've been searching and testing lots how to validate if an email really exists or not, but can't fins the php library to Works correctly like does some web pages.

I've tested: http://code.google.com/p/php-smtp-email-validation/ https://github.com/nsgeorgi/verify-email https://github.com/hbattat/verifyEmail

but some emails corrects shows like incorrect and the other way arround.

I have implemented verify-email and verifyEmail with 4 examples: http://survey.socialwibox.com/verifyemail/example.php

email <[email protected]> exist! email <[email protected]> exist! email <[email protected]> exist! email <[email protected]> valid, but not exist!

http://survey.socialwibox.com/verifyemail/example2.php

[email protected] -> Array [0] => invalid [1] <br> [email protected] -> Array [0] => invalid [1] <br> [email protected] -> Array [0] => valid [1] <br> [email protected] -> Array [0] => invalid [1] <br>

In fact both are ok with gmail but incorrect with jofre.com

[email protected] Exists [email protected] NOT EXISTS

If I test this email with this WEB: https://tools.email-checker.com/

all the results are the correct aswer with jofre.com

Is there any way to have it working like this website with PHP ?

Thanks

4
  • The only way to reliably know if an email exists is by using a confirmation email that requires user action. Commented Apr 23, 2015 at 23:11
  • Devon, the website I post check all this emails correctly... and the PHP codes doesn't. I would like to know if it is posible to get a PHP that give better results as website does. Commented Apr 23, 2015 at 23:21
  • Actually, no it doesn't. I just tested an email of mine and it didn't work. A mail server shouldn't report if an email is valid. That would be abused by spammers. Commented Apr 23, 2015 at 23:27
  • Did you find a solution to that yet? I heard those websites will send an email to check if the address is valid. Commented Sep 17, 2016 at 16:32

1 Answer 1

1

As far as I am aware, the only "reliable" way to check if an email really exists is to send a verification email to the address and have your user complete a "check".

You can use filter_var to check if the address is formatted correctly, and checkdnsrr to see if the domain is valid, but that's about it.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Michael.... and how this webpage Works ? It Works on all emails I check better than the php code. If this wepage does it we have to be able to do it as well .....

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.