Class IMAPUtils
- java.lang.Object
-
- org.apache.commons.net.examples.mail.IMAPUtils
-
final class IMAPUtils extends java.lang.Object
Utility class for shared IMAP utilities
-
-
Constructor Summary
Constructors Constructor Description IMAPUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static IMAPClient
imapLogin(java.net.URI uri, int defaultTimeout, ProtocolCommandListener listener)
Parses the URI and use the details to connect to the IMAP(S) server and login.
-
-
-
Method Detail
-
imapLogin
static IMAPClient imapLogin(java.net.URI uri, int defaultTimeout, ProtocolCommandListener listener) throws java.io.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:
java.io.IOException
- if any problems occur
-
-