daveearley / Email-Validation-Tool

An easy to use, accurate-ish & extensible email validation library for PHP 7+ 📧

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

valid_mx_records returns true always

ismailyenigul opened this issue · comments

Hi

I installed Email-Validation-Tool as a Docker container.

I tried with many non-existing domains but valid_mx_records response is always "true" all domains.

host -t mx nothinghere123.com

Host nothinghere123.com not found: 3(NXDOMAIN)

when I try with http://myIP:8880/?email=user@nothinghere123.com
{
"valid_format": true,
"valid_mx_records": true,
"possible_email_correction": "",
"free_email_provider": false,
"disposable_email_provider": false,
"role_or_business_email": false,
"valid_host": false
}

Hi @ismailyenigul,

Thanks for reporting. I looked into this and it appears there is an ongoing issue with checkdnsrr() returning false positives when being run within an alpine Docker container.

I've updated the Dockerfile to use the standard PHP image so it works again.

Cheers!