store = session.getStore(urln);
store.connect();
}
catch (Exception e)
{
throw new ArchivaException("unable to connect to mail server.", e, log);
}
try
{
// Open the Folder
inboxFolder = store.getDefaultFolder();
if (inboxFolder == null) { throw new ArchivaException("there was no default inbox folder found.", log); }
inboxFolder = inboxFolder.getFolder("INBOX");
if (inboxFolder == null) { throw new ArchivaException("the inbox folder does not exist.", log); }
inboxFolder.open(Folder.READ_WRITE);
}
catch (Exception e)
{
throw new ArchivaException("unable to open folder. ", e, log);
}
}