bbottema/simple-java-mail

Replace the email validation library with a better one

naude-r opened this issue · 5 comments

currently email address validation fails for addresses with diacritics, e.g: **çkayden****@gmail.com

disabling validation outright is a short-term solution. ideally one should be able to add a custom validator implementation.

would it be possible to add such a feature?

There's a pretty good chance that the underlying email validation library will be replaced with a better and faster one. See the discussion here: bbottema/email-rfc2822-validator#22. In which case your case would not be a problem anymore.

I think the validation library should be good enough and configurable enough so that would never need to replace it with your own validation. Backup scenario is to turn it off completely and do it manually, but we're not shooting for that.

The goal now is to probably replace https://github.com/bbottema/email-rfc2822-validator with https://github.com/RohanNagar/jmail.

Why? JMail is implemented with a lexer, which is far superior to regex based validation in terms of debugging, documentation and performance. In addition JMail is more up to date with recent RFC's, where email-rfc2822-validator is stuck in the past with RFC2822, while not covering it completely (but enough for practical use). This includes support for diacritics as mentioned in this bug report.

@bbottema thank you for the feedback. looking forward to the change.

Heads up that this is blocked until you can switch simple-java-mail to Java 8

(Java 8 also blocks #295)

7.0.0 just released!