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

domain valition error while validating using mx records(JMail.validator().requireValidMXRecord();) #207

Closed
2 tasks done
sai-ram-1661 opened this issue Jan 22, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@sai-ram-1661
Copy link

sai-ram-1661 commented Jan 22, 2024

Is this bug report about an incorrectly validated email address?

  • Yes

If yes, what is the email address?
familiashoafkozak@gmail.co

  • Invalid

If no, please describe the bug

Additional context

I have added JMail into my project And I have passed a email address (familiashoafkozak@gmail.co) which I have validated in my project using ( JMail.validator().requireValidMXRecord(); ) is giving me out put false which means it is invalid .but while I am using (https://www.rohannagar.com/jmail/) it is showing it as valid email address

@sai-ram-1661 sai-ram-1661 added the bug Something isn't working label Jan 22, 2024
@RohanNagar
Copy link
Owner

Hi @sai-ram-1661, thank you very much for the bug report. I am also seeing this behavior (invalid locally but valid with the online validator).

Unfortunately validating based on the domain having a valid MX record can be a little dependent on the system that JMail is being run on since it uses the local DNS resolver to determine if there is an MX record.

Can you tell me what you expect for this email address? Do you expect it to be valid or invalid?

@RohanNagar
Copy link
Owner

Hi @sai-ram-1661 I finally figured out this mystery!

It turns out that the gmail.co domain has a null MX record (which means the domain has specifically marked the domain as one that cannot accept mail).

There was a bug related to this in JMail that was addressed in November 2023 that fixed the issue (see #191). It seems like this code never got deployed to the backend that the online validator uses!

I just deployed the latest version of JMail and I now see that the online validator at https://www.rohannagar.com/jmail/ correctly shows familiashoafkozak@gmail.co as invalid (see screenshot).

Screenshot 2024-05-24 at 4 16 05 PM

Thanks so much for reporting this and sorry for the super long delay in figuring this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants