Skip to content

Releases: RohanNagar/jmail

v1.6.3

24 May 20:14
5068087
Compare
Choose a tag to compare
  • Fix bug where email addresses containing control characters in the local-part were incorrectly considered valid. (Thanks @PascalSchumacher for reporting!)
  • Add new methods ifValid(Consumer<Email> action) and ifValidOrElse(Consumer<Email> action, Consumer<FailureReason> failureAction) to the EmailValidationResult object.

v1.6.2

26 Nov 06:43
Compare
Choose a tag to compare
  • Fix bug where IPv4 addresses with non-arabic numerals would incorrectly be considered valid. (Thanks @harrel56 for reporting!)
  • Fix bug where IPv4 addresses with extraneous leading zeros would incorrectly be considered valid. (Thanks @harrel56 for reporting!)
  • The requireValidMXRecord() validation rule now correctly fails validation for domains that use a "Null MX" record. (Thanks @elmolm for contributing! 🎉)

v1.6.1

25 Oct 21:30
Compare
Choose a tag to compare
  • Fix bug so that email addresses that end in a dash - character now correctly fail validation with the reason FailureReason.DOMAIN_PART_ENDS_WITH_DASH instead of incorrectly returning FailureReason.ENDS_WITH_DOT. (Thanks @tbatchlear for reporting!)

v1.6.0

02 Sep 01:28
Compare
Choose a tag to compare
  • Add a new rule requireAscii() that considers an email address containing non-ASCII characters to be invalid. (Thanks @frodeto for suggesting!)
  • Add new property isAscii() on Email objects that returns if the email address only contains ASCII characters or not.
  • Add option to strip quotes within the local-part of an email address when normalizing the address with the normalize() method. (Thanks @tdelaney-leadiro for suggesting!)
    • This new option will remove quotes if the email address would still be valid and semantically the same without them.
    • To enable the option, either:
      • Call the normalize method that takes a boolean as the parameter, and use true. Example: email.normalize(true)
      • Set the -Djmail.normalize.strip.quotes=true JVM property at runtime, and continue to use the normalize() method without parameters.

v1.5.1

29 May 01:34
Compare
Choose a tag to compare
  • Add a new rule requireValidMXRecord(int initialTimeout, int numRetries) that allows for customization of the timeout for DNS lookups. (Thanks @dotneutron for suggesting!)
  • Reduce the default timeout for DNS lookups when adding the requireValidMXRecord() rule to an EmailValidator from potentially taking a maximum of 25 seconds to a maximum of 600 milliseconds.

v1.5.0

21 Mar 22:07
Compare
Choose a tag to compare
  • Add new method validate(String email) that returns an EmailValidationResult object, containing the reason for validation failure upon failure. (Thanks @bobharner for suggesting!)
  • Add new ValidationRule requireValidMXRecord() to consider email addresses that have a domain with no MX record in DNS as invalid. (Thanks @lpellegr for suggesting!)
  • Fix bug where an email address that ends with a comment that is missing the closing parentheses were incorrectly considered as valid. For example: test@test.com(comment

v1.4.1

03 Feb 19:03
Compare
Choose a tag to compare
  • Add new ValidationRule disallowObsoleteWhitespace() to consider email addresses with obsolete whitespace as invalid. (Thanks @PascalSchumacher for suggesting!)

v1.4.0

19 Jan 17:19
Compare
Choose a tag to compare
  • Add new normalized() method on the Email class to provide a way to get a "normalized" version of an email address (the address without any comments or optional parts).

v1.3.3

16 Nov 22:26
Compare
Choose a tag to compare
  • Fix bug where invalid characters in the domain could result in an IllegalArgumentException instead of returning false. (Thanks @PascalSchumacher for reporting!)

v1.3.2

20 Oct 15:44
Compare
Choose a tag to compare
  • Fix bug where domain names that contained an emoji would be incorrectly invalid. (Thanks @Autom8edChaos for reporting!)