Class IMAPUtils

java.lang.Object
org.apache.commons.net.examples.mail.IMAPUtils

class IMAPUtils extends Object
Utility class for shared IMAP utilities
  • 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/folder
      defaultTimeout - 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