implemented editing of list credentials for admin/owner, fixed bug:

if login fails due to wrong auth, it is no longer repeated. instead, the list is disabeld
This commit is contained in:
2022-04-22 18:20:03 +02:00
parent f234cded1b
commit 6abee6e977
15 changed files with 276 additions and 97 deletions

View File

@@ -14,6 +14,7 @@ public class ImapClient {
private static final Logger LOG = LoggerFactory.getLogger(ImapClient.class);
private final int port;
private final String host, username, password, folderName;
private final ProblemListener problemListener;
private IMAPFolder inbox;
private ListeningThread listeningThread;
private Heartbeat heartbeat;
@@ -47,6 +48,7 @@ public class ImapClient {
openInbox();
} catch (MessagingException e){
LOG.warn("Connection problem:",e);
problemListener.onImapException(e);
}
}
}
@@ -127,12 +129,13 @@ public class ImapClient {
}
}
public ImapClient(String host, int port, String username, String password, String folderName) {
public ImapClient(String host, int port, String username, String password, String folderName,ProblemListener listener) {
this.host = host;
this.port = port;
this.username = username;
this.password = password;
this.folderName = folderName;
this.problemListener = listener;
}
public ImapClient addListener(MessageHandler messageHandler) {