Interface MailboxReaderFactory
- All Known Implementing Classes:
MailboxReaderFactoryImpl
public interface MailboxReaderFactory
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncreateDirectoryReader(Path directory, @Nullable String pattern) Create a mailbox reader that reads in emails in a local directory.Creates a reader for messages in a folder which is specified by theurlargument.Creates a mail reader, that goes through all messages of the folder specified by theurlargument and all its subfolders.
-
Method Details
-
createMailFolderReader
MailboxReader createMailFolderReader(String url, MailboxReaderFactory.Mode mode) throws MailException Creates a reader for messages in a folder which is specified by theurlargument. Theurlmust contain all information to connect to the mailbox. By default the protocols pop3 and imap are supported. For example, aurlmight look like this:imap://your.name%40gmail.com:password@imap.gmail.com:143/INBOXNote, that the url must be x-www-form-urlencoded.- Parameters:
url- the url to one folder inside a mail boxmode- the mode used to open the folder- Returns:
- a reader for messages in the specified folder
- Throws:
MailException
-
createNestedMailFolderReader
MailboxReader createNestedMailFolderReader(String url, MailboxReaderFactory.Mode mode) throws MailException Creates a mail reader, that goes through all messages of the folder specified by theurlargument and all its subfolders. Theurlmust contain all information to connect to the mailbox. By default the protocols pop3 and imap are supported. For example, aurlmight look like this:imap://your.name%40gmail.com:password@imap.gmail.com:143/INBOXNote, that the url must be x-www-form-urlencoded.- Throws:
MailException
-
createDirectoryReader
Create a mailbox reader that reads in emails in a local directory. If a `pattern` is specified, the filename (without path) is glob-matched against it and only those that pass are read. It may be for example '*.eml' to only read files with eml extension.
-