working on IMAP listener

This commit is contained in:
2022-04-13 15:55:41 +02:00
parent a8cd4681d5
commit c9019b63f3
6 changed files with 185 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
package de.srsoftware.widerhall;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
public class Application {
public static void main(String[] args) throws IOException, ParseException {
var parser = new JSONParser();
var config = Files.readString(new File("/tmp/config.json").toPath());
JSONObject json = (JSONObject) parser.parse(config);
//String testSender = (String) json.get("sender");
//String testReceiver = (String) json.get("receiver");
// new SmtpClient(json).send(json,testSender,"Stephan Richter",testReceiver,"Test","Dies ist ein Test");
MessageHandler forward = new Forwarder();
new ImapClient(json).addListener(forward).start();
}
}