Package jodd.mail
Class ImapServer
- java.lang.Object
-
- jodd.mail.MailServer<ReceiveMailSession>
-
- jodd.mail.ImapServer
-
- Direct Known Subclasses:
ImapSslServer
public class ImapServer extends MailServer<ReceiveMailSession>
IMAP Server.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jodd.mail.MailServer
MailServer.Builder
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
DEFAULT_IMAP_PORT
Default IMAP port.protected static java.lang.String
PROTOCOL_IMAP
-
Fields inherited from class jodd.mail.MailServer
attachmentStorage, authenticator, customProperties, debugMode, host, MAIL_DEBUG, MAIL_HOST, MAIL_IMAP_CONNECTIONTIMEOUT, MAIL_IMAP_HOST, MAIL_IMAP_PARTIALFETCH, MAIL_IMAP_PEEK, MAIL_IMAP_PORT, MAIL_IMAP_SOCKET_FACTORY_CLASS, MAIL_IMAP_SOCKET_FACTORY_FALLBACK, MAIL_IMAP_SOCKET_FACTORY_PORT, MAIL_IMAP_TIMEOUT, MAIL_MIME_ADDRESS_STRICT, MAIL_POP3_AUTH, MAIL_POP3_CONNECTIONTIMEOUT, MAIL_POP3_HOST, MAIL_POP3_PORT, MAIL_POP3_SOCKET_FACTORY_CLASS, MAIL_POP3_SOCKET_FACTORY_FALLBACK, MAIL_POP3_SOCKET_FACTORY_PORT, MAIL_POP3_TIMEOUT, MAIL_SMTP_AUTH, MAIL_SMTP_CONNECTIONTIMEOUT, MAIL_SMTP_HOST, MAIL_SMTP_PORT, MAIL_SMTP_SOCKET_FACTORY_CLASS, MAIL_SMTP_SOCKET_FACTORY_FALLBACK, MAIL_SMTP_SOCKET_FACTORY_PORT, MAIL_SMTP_STARTTLS_ENABLE, MAIL_SMTP_STARTTLS_REQUIRED, MAIL_SMTP_TIMEOUT, MAIL_SMTP_WRITETIMEOUT, MAIL_TRANSPORT_PROTOCOL, port, strictAddress, timeout
-
-
Constructor Summary
Constructors Modifier Constructor Description ImapServer(MailServer.Builder builder)
protected
ImapServer(MailServer.Builder builder, int defaultPort)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReceiveMailSession
createSession()
Creates new mail session.protected java.util.Properties
createSessionProperties()
CreatesMailSession
Properties
.protected javax.mail.Store
getStore(javax.mail.Session session)
Returns email store.-
Methods inherited from class jodd.mail.MailServer
create
-
-
-
-
Field Detail
-
PROTOCOL_IMAP
protected static final java.lang.String PROTOCOL_IMAP
- See Also:
- Constant Field Values
-
DEFAULT_IMAP_PORT
protected static final int DEFAULT_IMAP_PORT
Default IMAP port.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ImapServer
public ImapServer(MailServer.Builder builder)
-
ImapServer
protected ImapServer(MailServer.Builder builder, int defaultPort)
-
-
Method Detail
-
createSessionProperties
protected java.util.Properties createSessionProperties()
Description copied from class:MailServer
CreatesMailSession
Properties
.- Overrides:
createSessionProperties
in classMailServer<ReceiveMailSession>
- Returns:
- session
Properties
-
getStore
protected javax.mail.Store getStore(javax.mail.Session session) throws javax.mail.NoSuchProviderException
Returns email store.- Returns:
IMAPStore
- Throws:
javax.mail.NoSuchProviderException
- if a provider for the given protocol is not found.
-
createSession
public ReceiveMailSession createSession()
Creates new mail session.- Specified by:
createSession
in classMailServer<ReceiveMailSession>
- Returns:
ReceiveMailSession
-
-