Use email-validator to parse emails and convert them to a consistent format for storage, which removes ambiguity since Unicode made it possible to have multiple equivalent forms of the same email address. See the description of email-validator for a more detailed explanation.
Since the username part of an email address is permitted to be case sensitive by RFC 5321, but in practice rarely is, store the email as the user gave it to us (after normalization by email_validator) and use that version for sending emails, but do all comparisons of and searches on email addresses in lower case.
Use
email-validator
to parse emails and convert them to a consistent format for storage, which removes ambiguity since Unicode made it possible to have multiple equivalent forms of the same email address. See the description of email-validator for a more detailed explanation.Since the username part of an email address is permitted to be case sensitive by RFC 5321, but in practice rarely is, store the email as the user gave it to us (after normalization by email_validator) and use that version for sending emails, but do all comparisons of and searches on email addresses in lower case.