public static boolean containsEmail(String chunk) {
        if (chunk == null) {
            return false;
        }

        if (EMAIL.matcher(chunk).find()) {
            return true;
        }
        return false;
    }
If the chunk looks like it contains an email

@param chunk to analyse
@return {@code true} if chunk looks like it contains an email
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-mail-commons/src/main/java/org/apache/tika/parser/mailcommons/MailUtil.java