/** * Is the specified address an email address? * * @param address the input address to test * @return true if address is an email address; false otherwise. */ private static boolean isEmailAddress(String address) { if (TextUtils.isEmpty(address)) { return false; } String s = extractAddrSpec(address); Matcher match = Patterns.EMAIL_ADDRESS.matcher(s); return match.matches(); }
recipient = extractAddrSpec(recipient);