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

When comparing two instances of EmailAddress, the domain should be treated case-insensitively #11

Closed
nrabulinski opened this issue Oct 10, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@nrabulinski
Copy link

From RFC 5321, section 2.4:

The local-part of a mailbox MUST BE treated as case sensitive. Therefore, SMTP implementations MUST take care to preserve the case of mailbox local-parts. In particular, for some hosts, the user "smith" is different from the user "Smith". However, exploiting the case sensitivity of mailbox local-parts impedes interoperability and is discouraged. Mailbox domains follow normal DNS rules and are hence not case sensitive.

@johnstonskj johnstonskj self-assigned this Nov 2, 2022
@johnstonskj johnstonskj added the bug Something isn't working label Nov 2, 2022
johnstonskj added a commit that referenced this issue Nov 2, 2022
1. Add manual implementation of `PartialEq` with case
insensitive comparison for domain part.
2. Add manual implementation of `Hash`, because above.
3. Change signature for `new_unchecked` to be more flexible.
4. Add `as_str` helper method.
@johnstonskj
Copy link
Owner

Should be fixed in b3e5205 which will be released as 0.2.4

@KisaragiEffective
Copy link

this may be closed ;)

@johnstonskj
Copy link
Owner

Thanks!

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

3 participants