DCValue[] authors = hii.item.getDC("contributor", Item.ANY, Item.ANY);  if (authors.length > 0)
emailText.append("New items in collection ").append( c.getMetadata("name")).append(": ").append( itemInfos.size()).append("\n\n");  for (int j = 0; j < itemInfos.size(); j++)
    public static void sendEmail(Context context, EPerson eperson,            List collections) throws IOException, MessagingException,            SQLException    {        // Get the start and end dates for yesterday        Date thisTimeYesterday = new Date(System.currentTimeMillis()                - (24 * 60 * 60 * 1000));        DCDate dcDateYesterday = new DCDate(thisTimeYesterday);        // this time yesterday in ISO 8601, stripping the time        String isoDateYesterday = dcDateYesterday.toString().substring(0, 10);        String startDate = isoDateYesterday;        String endDate = isoDateYesterday + "T23:59:59Z";        // FIXME: text of email should be more configurable from an        // i18n viewpoint        StringBuffer emailText = new StringBuffer();        boolean isFirst = true;        for (int i = 0; i < collections.size(); i++)        {            Collection c = (Collection) collections.get(i);            List itemInfos = Harvest.harvest(context, c, startDate, endDate, 0, // Limit                                                                                // and                                                                                // offset                                                                                // zero,                                                                                // get                                                                                // everything                    0, true, // Need item objects                    false, // But not containers                    false); // Or withdrawals            // Only add to buffer if there are new items            if (itemInfos.size() > 0)            {                if (!isFirst)                {                    emailText                            .append("\n---------------------------------------\n");                }                else                {                    isFirst = false;                }                emailText.append("New items in collection ").append(                        c.getMetadata("name")).append(": ").append(                        itemInfos.size()).append("\n\n");                for (int j = 0; j < itemInfos.size(); j++)                {                    HarvestedItemInfo hii = (HarvestedItemInfo) itemInfos                            .get(j);                    DCValue[] titles = hii.item.getDC("title", null, Item.ANY);                    emailText.append("      Title: ");                    if (titles.length > 0)                    {                        emailText.append(titles[0].value);                    }                    else                    {                        emailText.append("Untitled");                    }                    DCValue[] authors = hii.item.getDC("contributor", Item.ANY,                            Item.ANY);                    if (authors.length > 0)                    {                        emailText.append("\n    Authors: ").append(                                authors[0].value);                        for (int k = 1; k < authors.length; k++)                        {                            emailText.append("\n             ").append(                                    authors[k].value);                        }                    }                    emailText.append("\n         ID: ").append(                            HandleManager.getCanonicalForm(hii.handle)).append(                            "\n\n");                }            }        }        // Send an e-mail if there were any new items        if (emailText.length() > 0)        {            Email email = ConfigurationManager.getEmail("subscription");            email.addRecipient(eperson.getEmail());            email.addArgument(emailText.toString());            email.send();            log.info(LogManager.getHeader(context, "sent_subscription",                    "eperson_id=" + eperson.getID()));        }    }