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

Replace old email validation library with its successor #28

Closed
bbottema opened this issue Feb 25, 2016 · 3 comments
Closed

Replace old email validation library with its successor #28

bbottema opened this issue Feb 25, 2016 · 3 comments

Comments

@bbottema
Copy link
Owner

The email validation library was turned off by default because of performance / crashing bugs (#3). However, it has been improved upon by another maintainer who now use it in commercial products.

http://stackoverflow.com/a/13133880/441662
http://lacinato.com/cm/software/emailrelated/emailaddress

I'm putting it into github so anyone can contribute.

@bbottema
Copy link
Owner Author

@bbottema
Copy link
Owner Author

Started using code from bbottema/email-rfc2822-validator and turned the email validation routine back on by default.

@bbottema
Copy link
Owner Author

Release in v3.0.0!

Example through Mailer:

Mailer mailer = new Mailer(...); // already uses default RFC compliant validation

// customize to your needs ->
mailer.setEmailAddressCriteria(null);
mailer.setEmailAddressCriteria(EmailAddressCriteria.RFC_COMPLIANT);
mailer.setEmailAddressCriteria(EmailAddressCriteria.DEFAULT);
// or:
mailer.setEmailAddressCriteria(EnumSet.of(ALLOW_DOT_IN_A_TEXT, ALLOW_SQUARE_BRACKETS_IN_A_TEXT));

mailer.validateEmail(email);

You can also use the EmailAddressValidator directly (see https://github.com/bbottema/email-rfc2822-validator for that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant