Package org.luwrain.pim.fetching
Class MailConnections
java.lang.Object
org.luwrain.pim.fetching.MailConnections
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static final class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
fetchPop3
(String folderName, MailConnections.Listener listener, boolean deleteMessagesOnServer) Fetching of messages from the server.String[]
Session
byte[]
saveToByteArray
(Message message) void
send
(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:
IOException
InterruptedException
-
send
- Throws:
FetchingException
-
getFolderNames
- Throws:
Exception
-
saveToByteArray
- Throws:
MessagingException
IOException
-
getSession
public Session getSession()
-