public static boolean isValidEmailAddress ( final String email ) { if ( email == null ) { return false ; } boolean result = true ; try { final InternetAddress emailAddr = new InternetAddress ( email ) ; emailAddr . validate ( ) ; } catch ( final AddressException ex ) { result = false ; } return result ; }
Returns true if the given email is valid and false otherwise .