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

Email addresses with hyphens as the first or last letter in the domain part #317

Open
FrancisMawn opened this issue Mar 8, 2022 · 5 comments
Labels

Comments

@FrancisMawn
Copy link

FrancisMawn commented Mar 8, 2022

Hi,

I am currently using v3.1.2 and we have failed jobs trying to send emails to domain like foo@bar.-baz.com
These emails have passed the validation although the SMTP transactions are failing reporting an invalid email domain.
Is this supposed to be considered valid?

@FrancisMawn
Copy link
Author

I think the current validation does not account for subdomain fragments... ?

@egulias
Copy link
Owner

egulias commented Apr 2, 2022

Hi, thanks for your patience.
As far as I can tell, a dash/hyphen - after a dot . is not valid for domains parts according to RFC 1035. While it migh be valid according to the various "email" RFCs, this library changed to validate against the domain RFC since v3.

@egulias egulias closed this as completed Apr 2, 2022
@FrancisMawn
Copy link
Author

Thank you for your response @egulias.

I'm not sure I understand your reply... Are you acknowledging the issue? The current version does not mark the email as invalid when it should.

@ercanertan
Copy link

Why this issue closed?
I think including subdomain is essential.

@egulias egulias added the bug label Dec 27, 2024
egulias added a commit that referenced this issue Dec 27, 2024
@egulias
Copy link
Owner

egulias commented Dec 27, 2024

Apologies folks! Revisiting this I believe I completely misunderstood the question.
It is fixed in v4 if I got the tests right #397

@egulias egulias reopened this Dec 27, 2024
egulias added a commit that referenced this issue Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants