public abstract class MailServer<MailSessionImpl extends jodd.mail.MailSession>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MailServer.Builder
Used to create implementing instances of
MailServer . |
Modifier and Type | Field and Description |
---|---|
protected java.io.File |
attachmentStorage |
protected javax.mail.Authenticator |
authenticator
The
Authenticator . |
protected java.util.Properties |
customProperties |
protected boolean |
debugMode |
protected java.lang.String |
host
The host.
|
static java.lang.String |
MAIL_DEBUG |
static java.lang.String |
MAIL_HOST |
static java.lang.String |
MAIL_IMAP_CONNECTIONTIMEOUT |
static java.lang.String |
MAIL_IMAP_HOST |
static java.lang.String |
MAIL_IMAP_PARTIALFETCH |
static java.lang.String |
MAIL_IMAP_PORT |
static java.lang.String |
MAIL_IMAP_SOCKET_FACTORY_CLASS |
static java.lang.String |
MAIL_IMAP_SOCKET_FACTORY_FALLBACK |
static java.lang.String |
MAIL_IMAP_SOCKET_FACTORY_PORT |
static java.lang.String |
MAIL_IMAP_TIMEOUT |
static java.lang.String |
MAIL_MIME_ADDRESS_STRICT |
static java.lang.String |
MAIL_POP3_AUTH |
static java.lang.String |
MAIL_POP3_CONNECTIONTIMEOUT |
static java.lang.String |
MAIL_POP3_HOST |
static java.lang.String |
MAIL_POP3_PORT |
static java.lang.String |
MAIL_POP3_SOCKET_FACTORY_CLASS |
static java.lang.String |
MAIL_POP3_SOCKET_FACTORY_FALLBACK |
static java.lang.String |
MAIL_POP3_SOCKET_FACTORY_PORT |
static java.lang.String |
MAIL_POP3_TIMEOUT |
static java.lang.String |
MAIL_SMTP_AUTH |
static java.lang.String |
MAIL_SMTP_CONNECTIONTIMEOUT |
static java.lang.String |
MAIL_SMTP_HOST |
static java.lang.String |
MAIL_SMTP_PORT |
static java.lang.String |
MAIL_SMTP_SOCKET_FACTORY_CLASS |
static java.lang.String |
MAIL_SMTP_SOCKET_FACTORY_FALLBACK |
static java.lang.String |
MAIL_SMTP_SOCKET_FACTORY_PORT |
static java.lang.String |
MAIL_SMTP_STARTTLS_ENABLE |
static java.lang.String |
MAIL_SMTP_STARTTLS_REQUIRED |
static java.lang.String |
MAIL_SMTP_TIMEOUT |
static java.lang.String |
MAIL_SMTP_WRITETIMEOUT |
static java.lang.String |
MAIL_TRANSPORT_PROTOCOL |
protected int |
port
The port.
|
protected boolean |
strictAddress
Whether strict address checking is turned on.
|
protected int |
timeout
Connection timeout.
|
Modifier | Constructor and Description |
---|---|
protected |
MailServer(MailServer.Builder builder,
int defaultPort)
MailServer defined with its host, port and Authenticator . |
Modifier and Type | Method and Description |
---|---|
static MailServer.Builder |
create()
Returns new mail server builder.
|
abstract MailSessionImpl |
createSession()
Creates new mail session.
|
protected java.util.Properties |
createSessionProperties()
Creates
MailSession Properties . |
public static final java.lang.String MAIL_HOST
public static final java.lang.String MAIL_SMTP_HOST
public static final java.lang.String MAIL_SMTP_PORT
public static final java.lang.String MAIL_SMTP_AUTH
public static final java.lang.String MAIL_TRANSPORT_PROTOCOL
public static final java.lang.String MAIL_SMTP_CONNECTIONTIMEOUT
public static final java.lang.String MAIL_SMTP_TIMEOUT
public static final java.lang.String MAIL_SMTP_WRITETIMEOUT
public static final java.lang.String MAIL_DEBUG
public static final java.lang.String MAIL_MIME_ADDRESS_STRICT
public static final java.lang.String MAIL_IMAP_CONNECTIONTIMEOUT
public static final java.lang.String MAIL_IMAP_TIMEOUT
public static final java.lang.String MAIL_IMAP_PORT
public static final java.lang.String MAIL_IMAP_HOST
public static final java.lang.String MAIL_IMAP_PARTIALFETCH
public static final java.lang.String MAIL_IMAP_SOCKET_FACTORY_PORT
public static final java.lang.String MAIL_IMAP_SOCKET_FACTORY_CLASS
public static final java.lang.String MAIL_IMAP_SOCKET_FACTORY_FALLBACK
public static final java.lang.String MAIL_SMTP_STARTTLS_REQUIRED
public static final java.lang.String MAIL_SMTP_STARTTLS_ENABLE
public static final java.lang.String MAIL_SMTP_SOCKET_FACTORY_PORT
public static final java.lang.String MAIL_SMTP_SOCKET_FACTORY_CLASS
public static final java.lang.String MAIL_SMTP_SOCKET_FACTORY_FALLBACK
public static final java.lang.String MAIL_POP3_PORT
public static final java.lang.String MAIL_POP3_HOST
public static final java.lang.String MAIL_POP3_AUTH
public static final java.lang.String MAIL_POP3_CONNECTIONTIMEOUT
public static final java.lang.String MAIL_POP3_TIMEOUT
public static final java.lang.String MAIL_POP3_SOCKET_FACTORY_PORT
public static final java.lang.String MAIL_POP3_SOCKET_FACTORY_CLASS
public static final java.lang.String MAIL_POP3_SOCKET_FACTORY_FALLBACK
protected final java.lang.String host
protected final int port
protected final javax.mail.Authenticator authenticator
Authenticator
.protected final java.io.File attachmentStorage
protected final boolean debugMode
protected final boolean strictAddress
protected final int timeout
protected final java.util.Properties customProperties
protected MailServer(MailServer.Builder builder, int defaultPort)
MailServer
defined with its host, port and Authenticator
.public abstract MailSessionImpl createSession()
MailSession
or an implementing class such as ReceiveMailSession
or SendMailSession
. The Session
properties must be set before
the Session
is created.protected java.util.Properties createSessionProperties()
MailSession
Properties
.Properties
public static MailServer.Builder create()
Copyright © 2003-present Jodd Team