Package org.luwrain.pim.fetching
Class MailConnections
java.lang.Object
org.luwrain.pim.fetching.MailConnections
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfetchPop3(String folderName, MailConnections.Listener listener, boolean deleteMessagesOnServer) Fetching of messages from the server.String[]Sessionbyte[]saveToByteArray(Message message) voidsend(byte[] bytes)
-
Constructor Details
-
MailConnections
- Throws:
PimException
-
-
Method Details
-
fetchPop3
public boolean fetchPop3(String folderName, MailConnections.Listener listener, boolean deleteMessagesOnServer) throws IOException, InterruptedException Fetching of messages from the server.- Parameters:
folderName- Can be "INBOX" or any other IMAP folder namelistener- The listener object to get information about fetching progressdeleteMessagesOnServer- Must be true, if successfully fetched messages must be deleted on the server- Throws:
IOExceptionInterruptedException
-
send
- Throws:
FetchingException
-
getFolderNames
- Throws:
Exception
-
saveToByteArray
- Throws:
MessagingExceptionIOException
-
getSession
public Session getSession()
-