public static Email getMessageByID(String volumeName, String uniqueId, boolean headersOnly) throws ArchivaException {
if (volumeName == null || uniqueId == null)
throw new ArchivaException("assertion failure: null emailId",logger);
logger.debug("getMessageByID() {volumeName="+volumeName+",uniqueId='"+uniqueId+"'}");
Volume volume = ConfigurationService.getConfig().getVolumes().getNewVolume(volumeName);
EmailID emailID = EmailID.getEmailID(volume, uniqueId);
return messageStore.retrieveMessage(emailID);
}