public boolean checkEmail(String email){
if (email !=null || email.length()>0){
Pattern pattern = Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(email);
return matcher.find();
}
return false;
}