Home | Schulung | Beratung | Referenzen | Veröffentlichungen | Jobs | Sitemap | Kontakt

Erste Folie | Zurück | Weiter | Letzte FolieGrafikversion | Inhalt | Home

PopTask

public class PopTask {
...
public void execute() throws BuildException {
store = Session.getInstance(getProperties()).getStore("pop3");
store.connect(getPop3Host(), getUserName(), getPassword());
folder store.getFolder(INBOX_FOLDER_NAME);
folder.open(Folder.READ_WRITE);
Message[] messages = folder.getMessages();
for (int i = 0; i < messages.length; i++) {
writeMessage(messages[i]);
messages[i].setFlag(Flags.Flag.DELETED, deleteMessages);
}
}
public String getPop3Host() { .. }
public void setPop3Host(String pop3Host) { ... }
public File getOutDir() { ... }
public void setOutDir(File outDir) { ... }
}


Achtung
Pseudocode!