zytzagoo / smtp-validate-email

A PHP library for performing email addresses validation via SMTP
GNU General Public License v3.0
438 stars 155 forks source link

Does not Work #22

Open mailparikshit opened 7 years ago

mailparikshit commented 7 years ago

i tried your code on different servers it returns false for valid email too

sadortun commented 7 years ago

Port 25 is often blocked by "cheap" hosting provider, and about all cloud provider

mailparikshit commented 7 years ago

i have tested this on my different Dedicated server where in and out emails are working fine. i have port 25 open, this is not tested on shared hosting, it is dedicated server.

i tried checking email of yahoo, gmail, hotmail, rediffmail, all of them returns false

can you re-test this code and see if this is still working

mezorba commented 7 years ago

The code works as it should be. I tried it on several different dedicated and virtual servers too.

Can you set the debug property true and share the logs?

zytzagoo commented 7 years ago

Thanks for taking the time to report your issue.

You'll have to provide more info before anyone can even attempt to try to help you.

mailparikshit commented 7 years ago

This is my Debug logs

MX records (yahoo.com): Array ( [mta7.am0.yahoodns.net] => 1 [mta6.am0.yahoodns.net] => 1 [mta5.am0.yahoodns.net] => 1 [yahoo.com] => 0 )

Connecting to mta7.am0.yahoodns.net:25

Connect failed: Connection timed out, error number: 110, host: mta7.am0.yahoodns.net:25

Unable to connect. Exception caught: Cannot open a connection to remote host (mta7.am0.yahoodns.net:25)

Connecting to mta6.am0.yahoodns.net:25

Connect failed: Connection timed out, error number: 110, host: mta6.am0.yahoodns.net:25

Unable to connect. Exception caught: Cannot open a connection to remote host (mta6.am0.yahoodns.net:25)

Connecting to mta5.am0.yahoodns.net:25

Connect failed: Connection timed out, error number: 110, host: mta5.am0.yahoodns.net:25

Unable to connect. Exception caught: Cannot open a connection to remote host (mta5.am0.yahoodns.net:25)

Connecting to yahoo.com:25

Connect failed: Connection timed out, error number: 110, host: yahoo.com:25

Unable to connect. Exception caught: Cannot open a connection to remote host (yahoo.com:25) array(2) { ["replacedmyemail@yahoo.com"]=> bool(false) ["domains"]=> array(1) { ["yahoo.com"]=> array(2) { ["users"]=> array(1) { [0]=> string(6) "replacedmyemail" } ["mxs"]=> array(4) { ["mta7.am0.yahoodns.net"]=> int(1) ["mta6.am0.yahoodns.net"]=> int(1) ["mta5.am0.yahoodns.net"]=> int(1) ["yahoo.com"]=> int(0) } } } }

zytzagoo commented 7 years ago

You can try increasing the connection timeouts, but the most likely thing is that the remote server is just dropping your connections and completely ignoring you.

I'm gonna have to suggest that you read through https://github.com/zytzagoo/smtp-validate-email/issues/8 and https://github.com/zytzagoo/smtp-validate-email/issues/3

You might wanna give https://github.com/hbattat/verifyEmail a go as well...