use of org.xwiki.mail.MailStoreException in project xwiki-platform by xwiki.
the class FileSystemMailContentStore method load.
@Override
public ExtendedMimeMessage load(Session session, String batchId, String uniqueMessageId) throws MailStoreException {
File messageFile = null;
try {
messageFile = getMessageFile(batchId, uniqueMessageId);
InputStream is = new FileInputStream(messageFile);
return new ExtendedMimeMessage(session, is);
} catch (Exception e) {
throw new MailStoreException(String.format("Failed to load message (id [%s], batch id [%s]) from file [%s]", uniqueMessageId, batchId, messageFile), e);
}
}
Aggregations