1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-13 01:36:18 +00:00

Add option to specify a particular IMAP folder (aka "label" in Gmail) (#477)

This commit is contained in:
Evil McJerkface
2020-11-22 06:39:39 -06:00
committed by GitHub
parent b6ec5e108b
commit 1346dd3616
20 changed files with 42 additions and 6 deletions

View File

@@ -42,6 +42,7 @@ public enum ConfigType {
INBOX_PORT,
INBOX_USERNAME,
INBOX_PASSWORD,
INBOX_FOLDER,
INBOX_TAG,
INBOX_AUTOMATIC_TAGS,
INBOX_DELETE_IMPORTED,

View File

@@ -97,7 +97,7 @@ public class InboxService extends AbstractScheduledService {
} catch (FolderClosedException e) {
// Ignore this, we will just continue importing on the next cycle
} catch (Exception e) {
log.error("Error synching the inbox", e);
log.error("Error syncing the inbox", e);
lastSyncError = e.getMessage();
} finally {
try {
@@ -181,7 +181,7 @@ public class InboxService extends AbstractScheduledService {
store.connect(ConfigUtil.getConfigStringValue(ConfigType.INBOX_USERNAME),
ConfigUtil.getConfigStringValue(ConfigType.INBOX_PASSWORD));
Folder inbox = store.getFolder("INBOX");
Folder inbox = store.getFolder(ConfigUtil.getConfigStringValue(ConfigType.INBOX_FOLDER));
inbox.open(Folder.READ_WRITE);
return inbox;
}

View File

@@ -1 +1 @@
db.version=26
db.version=27

View File

@@ -0,0 +1,2 @@
insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_FOLDER', 'INBOX');
update T_CONFIG set CFG_VALUE_C = '27' where CFG_ID_C = 'DB_VERSION';