Class IMAPUtils
java.lang.Object
org.apache.commons.net.examples.mail.IMAPUtils
Utility class for shared IMAP utilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static IMAPClient
imapLogin
(URI uri, int defaultTimeout, ProtocolCommandListener listener) Parses the URI and use the details to connect to the IMAP(S) server and login.
-
Constructor Details
-
IMAPUtils
IMAPUtils()
-
-
Method Details
-
imapLogin
static IMAPClient imapLogin(URI uri, int defaultTimeout, ProtocolCommandListener listener) throws IOException Parses the URI and use the details to connect to the IMAP(S) server and login.- Parameters:
uri
- the URI to use, e.g. imaps://user:pass@imap.mail.yahoo.com/folder or imaps://user:pass@imap.googlemail.com/folderdefaultTimeout
- initial timeout (in milliseconds)listener
- for tracing protocol IO (may be null)- Returns:
- the IMAP client - connected and logged in
- Throws:
IOException
- if any problems occur
-