}
if (titleDC != null && titleDC.length > 0) {
title = titleDC[0].value;
}
RequestItemAuthor requestItemAuthor = new DSpace()
.getServiceManager()
.getServiceByName(
RequestItemAuthorExtractor.class.getName(),
RequestItemAuthorExtractor.class
)
.getRequestItemAuthor(context, item);
RequestItem requestItem = new RequestItem(item.getID(), Integer.parseInt(bitstreamId), requesterEmail, requesterName, message, Boolean.getBoolean(allFiles));
// All data is there, send the email
Email email = Email.getEmail(I18nUtil.getEmailFilename(context.getCurrentLocale(), "request_item.author"));
email.addRecipient(requestItemAuthor.getEmail());
email.addArgument(requesterName);
email.addArgument(requesterEmail);
email.addArgument(allFiles.equals("true")?I18nUtil.getMessage("itemRequest.all"):Bitstream.find(context,Integer.parseInt(bitstreamId)).getName());
email.addArgument(HandleManager.getCanonicalForm(item.getHandle()));
email.addArgument(title); // request item title
email.addArgument(message); // message
email.addArgument(getLinkTokenEmail(context,requestItem));
email.addArgument(requestItemAuthor.getFullName()); // corresponding author name
email.addArgument(requestItemAuthor.getEmail()); // corresponding author email
email.addArgument(ConfigurationManager.getProperty("dspace.name"));
email.addArgument(ConfigurationManager.getProperty("mail.helpdesk"));
email.setReplyTo(requesterEmail);