public static boolean isValid ( final String value ) { if ( value == null ) { return true ; } if ( value . length ( ) == 0 ) { return false ; } try { InternetAddress . parse ( value , false ) ; return true ; } catch ( final AddressException ex ) { return false ; } }
Check that a given string is a well - formed email address .