Skip to content

Replace old email validation library with its successor #28

Closed

Description

@bbottema

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.

Activity

  1. self-assigned this
    on Feb 25, 2016
  2. bbottema commented on Feb 25, 2016

    @bbottema
    OwnerAuthor
  3. bbottema commented on Feb 26, 2016

    @bbottema
    OwnerAuthor

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

  4. bbottema commented on Feb 26, 2016

    @bbottema
    OwnerAuthor

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions