public class MailConfig
extends io.vertx.core.net.NetClientOptions
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ALLOW_RCPT_ERRORS |
static boolean |
DEFAULT_DISABLE_ESMTP |
static boolean |
DEFAULT_ENABLE_PIPELINING |
static String |
DEFAULT_HOST |
static boolean |
DEFAULT_KEEP_ALIVE |
static int |
DEFAULT_KEEP_ALIVE_TIMEOUT
The default keep alive timeout for SMTP connection = 5 minutes
|
static TimeUnit |
DEFAULT_KEEP_ALIVE_TIMEOUT_UNIT |
static LoginOption |
DEFAULT_LOGIN |
static int |
DEFAULT_MAX_POOL_SIZE |
static boolean |
DEFAULT_MULTI_PART_ONLY |
static int |
DEFAULT_POOL_CLEANER_PERIOD
Default pool cleaner period = 1000 ms (1 second)
|
static TimeUnit |
DEFAULT_POOL_CLEANER_PERIOD_TIMEOUT_UNIT |
static int |
DEFAULT_PORT |
static StartTLSOptions |
DEFAULT_TLS |
static String |
DEFAULT_USER_AGENT |
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL
DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_USE_ALPN
Constructor and Description |
---|
MailConfig()
construct a config object with default options
|
MailConfig(io.vertx.core.json.JsonObject config)
construct config object from Json representation
|
MailConfig(MailConfig other)
copy config object from another MailConfig object
|
MailConfig(String hostname)
construct a config object with hostname and default options
|
MailConfig(String hostname,
int port)
construct a config object with hostname/port and default options
|
MailConfig(String hostname,
int port,
StartTLSOptions starttls,
LoginOption login)
construct a config object with hostname/port and security and login options
|
Modifier and Type | Method and Description |
---|---|
MailConfig |
addCrlPath(String crlPath) |
MailConfig |
addCrlValue(io.vertx.core.buffer.Buffer crlValue) |
MailConfig |
addDKIMSignOption(DKIMSignOptions dkimSignOptions)
Adds a DKIMSignOptions.
|
MailConfig |
addEnabledCipherSuite(String suite) |
MailConfig |
addEnabledSecureTransportProtocol(String protocol) |
boolean |
equals(Object o) |
String |
getAuthMethods()
get string of allowed auth methods, if set only these methods will be used
if the server supports them.
|
DKIMSignOptions |
getDKIMSignOption()
Gets the DKIM options.
|
List<DKIMSignOptions> |
getDKIMSignOptions()
Gets the DKIM options.
|
String |
getHostname()
get the hostname of the mailserver
|
int |
getKeepAliveTimeout() |
TimeUnit |
getKeepAliveTimeoutUnit()
Gets the
TimeUnit of keeping the connections alive timeout. |
String |
getKeyStore()
Deprecated.
use
TCPSSLOptions.getTrustStoreOptions() |
String |
getKeyStorePassword()
Deprecated.
use
TCPSSLOptions.getTrustStoreOptions() |
LoginOption |
getLogin()
get login options
|
int |
getMaxPoolSize()
get the max allowed number of open connections to the mailserver
if not set the default is 10
|
String |
getNtDomain()
Domain used on NTLM authentication.
|
String |
getOwnHostname()
get the hostname to be used for HELO/EHLO and the Message-ID
|
String |
getPassword()
get password
|
int |
getPoolCleanerPeriod() |
TimeUnit |
getPoolCleanerPeriodUnit()
Gets the
TimeUnit of pool cleaning period. |
int |
getPort()
get the port of the mailserver
|
StartTLSOptions |
getStarttls()
get security (TLS) options
|
String |
getUserAgent()
Gets the Mail User Agent(MUA) name that will be used to generate boundary and message id.
|
String |
getUsername()
get username
|
String |
getWorkstation()
Workstation used on NTLM authentication
|
int |
hashCode() |
boolean |
isAllowRcptErrors()
get if sending allows rcpt errors (default is false)
|
boolean |
isDisableEsmtp()
get if ESMTP should be tried as first command (EHLO) (default is true)
|
boolean |
isEnableDKIM()
Is DKIM enabled, defaults to false.
|
boolean |
isKeepAlive()
get if connection pool is enabled
default is true
|
boolean |
isMultiPartOnly()
Should the mail message be always encoded as multipart.
|
boolean |
isPipelining()
Is the pipelining will be used if SMTP server supports it.
|
MailConfig |
removeEnabledSecureTransportProtocol(String protocol) |
MailConfig |
setAllowRcptErrors(boolean allowRcptErrors)
set if sending allows rcpt errors
|
MailConfig |
setAuthMethods(String authMethods)
set string of allowed auth methods.
|
MailConfig |
setConnectTimeout(int connectTimeout) |
MailConfig |
setDisableEsmtp(boolean disableEsmtp)
set if ESMTP should be tried as first command (EHLO)
|
MailConfig |
setDKIMSignOption(DKIMSignOptions dkimSignOptions)
Sets one DKIMSignOptions for convenient.
|
MailConfig |
setDKIMSignOptions(List<DKIMSignOptions> dkimSignOptions)
Sets DKIMSignOptions.
|
MailConfig |
setEnableDKIM(boolean enableDKIM)
Sets true to enable DKIM Signatures, sets false to disable it.
|
MailConfig |
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols) |
MailConfig |
setHostname(String hostname)
Set the hostname of the smtp server.
|
MailConfig |
setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm) |
MailConfig |
setIdleTimeout(int idleTimeout) |
MailConfig |
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit) |
MailConfig |
setJdkSslEngineOptions(io.vertx.core.net.JdkSSLEngineOptions sslEngineOptions) |
MailConfig |
setKeepAlive(boolean keepAlive)
set if connection pool is enabled
default is true
|
MailConfig |
setKeepAliveTimeout(int keepAliveTimeout)
Set the keep alive timeout for SMTP connection, Defaults in seconds.
|
MailConfig |
setKeepAliveTimeoutUnit(TimeUnit keepAliveTimeoutUnit)
Sets
TimeUnit of keeping connections in the pool alive. |
MailConfig |
setKeyCertOptions(io.vertx.core.net.KeyCertOptions options) |
MailConfig |
setKeyStore(String keyStore)
Deprecated.
use
TCPSSLOptions.getTrustStoreOptions() |
MailConfig |
setKeyStoreOptions(io.vertx.core.net.JksOptions options) |
MailConfig |
setKeyStorePassword(String keyStorePassword)
Deprecated.
use
TCPSSLOptions.getTrustStoreOptions() |
MailConfig |
setLocalAddress(String localAddress) |
MailConfig |
setLogActivity(boolean logEnabled) |
MailConfig |
setLogin(LoginOption login)
Set the login mode for the connection.
|
MailConfig |
setMaxPoolSize(int maxPoolSize)
set the max allowed number of open connections to the mail server
if not set the default is 10
|
MailConfig |
setMetricsName(String metricsName) |
MailConfig |
setMultiPartOnly(boolean multiPartOnly)
Sets to encode multipart only or not.
|
MailConfig |
setNtDomain(String ntDomain)
Sets the domain used on NTLM authentication
|
MailConfig |
setOpenSslEngineOptions(io.vertx.core.net.OpenSSLEngineOptions sslEngineOptions) |
MailConfig |
setOwnHostname(String ownHostname)
set the hostname to be used for HELO/EHLO and the Message-ID
|
MailConfig |
setPassword(String password)
Set the password for the login.
|
MailConfig |
setPemKeyCertOptions(io.vertx.core.net.PemKeyCertOptions options) |
MailConfig |
setPemTrustOptions(io.vertx.core.net.PemTrustOptions options) |
MailConfig |
setPfxKeyCertOptions(io.vertx.core.net.PfxOptions options) |
MailConfig |
setPfxTrustOptions(io.vertx.core.net.PfxOptions options) |
MailConfig |
setPipelining(boolean pipelining)
Sets to enable/disable the pipelining capability if SMTP server supports it.
|
MailConfig |
setPoolCleanerPeriod(int poolCleanerPeriod)
Set the connection pool cleaner period, defaults in milli seconds, a non positive value disables expiration checks and connections
will remain in the pool until they are closed.
|
MailConfig |
setPoolCleanerPeriodUnit(TimeUnit poolCleanerPeriodUnit)
Sets the
TimeUnit of pool cleaning period. |
MailConfig |
setPort(int port)
Set the port of the smtp server.
|
MailConfig |
setProxyOptions(io.vertx.core.net.ProxyOptions proxyOptions) |
MailConfig |
setReceiveBufferSize(int receiveBufferSize) |
MailConfig |
setReconnectAttempts(int attempts) |
MailConfig |
setReconnectInterval(long interval) |
MailConfig |
setReuseAddress(boolean reuseAddress) |
MailConfig |
setReusePort(boolean reusePort) |
MailConfig |
setSendBufferSize(int sendBufferSize) |
MailConfig |
setSoLinger(int soLinger) |
MailConfig |
setSsl(boolean isSsl) |
MailConfig |
setSslEngineOptions(io.vertx.core.net.SSLEngineOptions sslEngineOptions) |
MailConfig |
setSslHandshakeTimeout(long sslHandshakeTimeout) |
MailConfig |
setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit) |
MailConfig |
setStarttls(StartTLSOptions starttls)
Set the tls security mode for the connection.
|
MailConfig |
setTcpCork(boolean tcpCork) |
MailConfig |
setTcpFastOpen(boolean tcpFastOpen) |
MailConfig |
setTcpKeepAlive(boolean tcpKeepAlive) |
MailConfig |
setTcpNoDelay(boolean tcpNoDelay) |
MailConfig |
setTcpQuickAck(boolean tcpQuickAck) |
MailConfig |
setTrafficClass(int trafficClass) |
MailConfig |
setTrustAll(boolean trustAll) |
MailConfig |
setTrustOptions(io.vertx.core.net.TrustOptions options) |
MailConfig |
setTrustStoreOptions(io.vertx.core.net.JksOptions options) |
MailConfig |
setUseAlpn(boolean useAlpn) |
MailConfig |
setUserAgent(String userAgent)
Sets the Mail User Agent(MUA) name.
|
MailConfig |
setUsername(String username)
Set the username for the login.
|
MailConfig |
setWorkstation(String workstation)
Sets the workstation used on NTLM authentication
|
io.vertx.core.json.JsonObject |
toJson()
convert config object to Json representation
|
addNonProxyHost, getApplicationLayerProtocols, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, setApplicationLayerProtocols, setNonProxyHosts
getConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getProxyOptions, isTrustAll
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn
public static final LoginOption DEFAULT_LOGIN
public static final StartTLSOptions DEFAULT_TLS
public static final int DEFAULT_PORT
public static final String DEFAULT_HOST
public static final int DEFAULT_MAX_POOL_SIZE
public static final boolean DEFAULT_ALLOW_RCPT_ERRORS
public static final boolean DEFAULT_KEEP_ALIVE
public static final boolean DEFAULT_DISABLE_ESMTP
public static final String DEFAULT_USER_AGENT
public static final boolean DEFAULT_ENABLE_PIPELINING
public static final boolean DEFAULT_MULTI_PART_ONLY
public static final int DEFAULT_POOL_CLEANER_PERIOD
public static final TimeUnit DEFAULT_POOL_CLEANER_PERIOD_TIMEOUT_UNIT
public static final int DEFAULT_KEEP_ALIVE_TIMEOUT
public static final TimeUnit DEFAULT_KEEP_ALIVE_TIMEOUT_UNIT
public MailConfig()
public MailConfig(String hostname)
hostname
- the hostname of the mail serverpublic MailConfig(String hostname, int port)
hostname
- the hostname of the mail serverport
- the port of the mail serverpublic MailConfig(String hostname, int port, StartTLSOptions starttls, LoginOption login)
hostname
- the hostname of the mail serverport
- the port of the mail serverstarttls
- whether to use TLS or notlogin
- whether to use Login or notpublic MailConfig(MailConfig other)
other
- the object to be copiedpublic MailConfig(io.vertx.core.json.JsonObject config)
config
- the config to copypublic MailConfig setSendBufferSize(int sendBufferSize)
setSendBufferSize
in class io.vertx.core.net.NetClientOptions
public MailConfig setReceiveBufferSize(int receiveBufferSize)
setReceiveBufferSize
in class io.vertx.core.net.NetClientOptions
public MailConfig setReuseAddress(boolean reuseAddress)
setReuseAddress
in class io.vertx.core.net.NetClientOptions
public MailConfig setReusePort(boolean reusePort)
setReusePort
in class io.vertx.core.net.NetClientOptions
public MailConfig setTrafficClass(int trafficClass)
setTrafficClass
in class io.vertx.core.net.NetClientOptions
public MailConfig setTcpNoDelay(boolean tcpNoDelay)
setTcpNoDelay
in class io.vertx.core.net.NetClientOptions
public MailConfig setTcpKeepAlive(boolean tcpKeepAlive)
setTcpKeepAlive
in class io.vertx.core.net.NetClientOptions
public MailConfig setSoLinger(int soLinger)
setSoLinger
in class io.vertx.core.net.NetClientOptions
public MailConfig setIdleTimeout(int idleTimeout)
setIdleTimeout
in class io.vertx.core.net.NetClientOptions
public MailConfig setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
setIdleTimeoutUnit
in class io.vertx.core.net.NetClientOptions
public MailConfig setKeyCertOptions(io.vertx.core.net.KeyCertOptions options)
setKeyCertOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setKeyStoreOptions(io.vertx.core.net.JksOptions options)
setKeyStoreOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setPfxKeyCertOptions(io.vertx.core.net.PfxOptions options)
setPfxKeyCertOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setPemKeyCertOptions(io.vertx.core.net.PemKeyCertOptions options)
setPemKeyCertOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setTrustOptions(io.vertx.core.net.TrustOptions options)
setTrustOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setTrustStoreOptions(io.vertx.core.net.JksOptions options)
setTrustStoreOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setPemTrustOptions(io.vertx.core.net.PemTrustOptions options)
setPemTrustOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setPfxTrustOptions(io.vertx.core.net.PfxOptions options)
setPfxTrustOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig addEnabledCipherSuite(String suite)
addEnabledCipherSuite
in class io.vertx.core.net.NetClientOptions
public MailConfig addEnabledSecureTransportProtocol(String protocol)
addEnabledSecureTransportProtocol
in class io.vertx.core.net.NetClientOptions
public MailConfig removeEnabledSecureTransportProtocol(String protocol)
removeEnabledSecureTransportProtocol
in class io.vertx.core.net.NetClientOptions
public MailConfig setUseAlpn(boolean useAlpn)
setUseAlpn
in class io.vertx.core.net.NetClientOptions
public MailConfig setSslEngineOptions(io.vertx.core.net.SSLEngineOptions sslEngineOptions)
setSslEngineOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setJdkSslEngineOptions(io.vertx.core.net.JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setTcpFastOpen(boolean tcpFastOpen)
setTcpFastOpen
in class io.vertx.core.net.NetClientOptions
public MailConfig setTcpCork(boolean tcpCork)
setTcpCork
in class io.vertx.core.net.NetClientOptions
public MailConfig setTcpQuickAck(boolean tcpQuickAck)
setTcpQuickAck
in class io.vertx.core.net.NetClientOptions
public MailConfig setOpenSslEngineOptions(io.vertx.core.net.OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig addCrlPath(String crlPath) throws NullPointerException
addCrlPath
in class io.vertx.core.net.NetClientOptions
NullPointerException
public MailConfig addCrlValue(io.vertx.core.buffer.Buffer crlValue) throws NullPointerException
addCrlValue
in class io.vertx.core.net.NetClientOptions
NullPointerException
public MailConfig setConnectTimeout(int connectTimeout)
setConnectTimeout
in class io.vertx.core.net.NetClientOptions
public MailConfig setMetricsName(String metricsName)
setMetricsName
in class io.vertx.core.net.NetClientOptions
public MailConfig setReconnectAttempts(int attempts)
setReconnectAttempts
in class io.vertx.core.net.NetClientOptions
public MailConfig setReconnectInterval(long interval)
setReconnectInterval
in class io.vertx.core.net.NetClientOptions
public MailConfig setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
setHostnameVerificationAlgorithm
in class io.vertx.core.net.NetClientOptions
public MailConfig setLogActivity(boolean logEnabled)
setLogActivity
in class io.vertx.core.net.NetClientOptions
public MailConfig setProxyOptions(io.vertx.core.net.ProxyOptions proxyOptions)
setProxyOptions
in class io.vertx.core.net.NetClientOptions
public MailConfig setLocalAddress(String localAddress)
setLocalAddress
in class io.vertx.core.net.NetClientOptions
public MailConfig setSslHandshakeTimeout(long sslHandshakeTimeout)
setSslHandshakeTimeout
in class io.vertx.core.net.NetClientOptions
public MailConfig setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
setSslHandshakeTimeoutUnit
in class io.vertx.core.net.NetClientOptions
public String getHostname()
public MailConfig setHostname(String hostname)
hostname
- the hostname (default is localhost)public int getPort()
public MailConfig setPort(int port)
port
- the port (default is 25)public StartTLSOptions getStarttls()
public MailConfig setStarttls(StartTLSOptions starttls)
Either NONE, OPTIONAL or REQUIRED
starttls
- (default is OPTIONAL)public LoginOption getLogin()
public MailConfig setLogin(LoginOption login)
Either DISABLED, OPTIONAL or REQUIRED
login
- (default is OPTIONAL)public String getUsername()
public MailConfig setUsername(String username)
username
- the usernamepublic String getPassword()
public MailConfig setPassword(String password)
password
- the passwordpublic MailConfig setSsl(boolean isSsl)
setSsl
in class io.vertx.core.net.NetClientOptions
public MailConfig setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
setEnabledSecureTransportProtocols
in class io.vertx.core.net.NetClientOptions
public MailConfig setTrustAll(boolean trustAll)
setTrustAll
in class io.vertx.core.net.NetClientOptions
@Deprecated public String getKeyStore()
TCPSSLOptions.getTrustStoreOptions()
@Deprecated public MailConfig setKeyStore(String keyStore)
TCPSSLOptions.getTrustStoreOptions()
if not set, an options object will be created based on other settings (ssl and trustAll)
keyStore
- the key store filename to be set@Deprecated public String getKeyStorePassword()
TCPSSLOptions.getTrustStoreOptions()
@Deprecated public MailConfig setKeyStorePassword(String keyStorePassword)
TCPSSLOptions.getTrustStoreOptions()
keyStorePassword
- the key store passwords to be setpublic String getAuthMethods()
public MailConfig setAuthMethods(String authMethods)
authMethods
- the authMethods to setpublic String getOwnHostname()
public MailConfig setOwnHostname(String ownHostname)
ownHostname
- my own hostname to setpublic int getMaxPoolSize()
public MailConfig setMaxPoolSize(int maxPoolSize)
public boolean isKeepAlive()
if the connection pooling is disabled, the max number of sockets is enforced nevertheless
public MailConfig setKeepAlive(boolean keepAlive)
if the connection pooling is disabled, the max number of sockets is enforced nevertheless
public boolean isAllowRcptErrors()
if true, the mail will be sent to the recipients that the server accepted, if any
public MailConfig setAllowRcptErrors(boolean allowRcptErrors)
if true, the mail will be sent to the recipients that the server accepted, if any
allowRcptErrors
- the allowRcptErrors to set (default is false)public boolean isDisableEsmtp()
rfc 1869 states that clients should always attempt EHLO as first command to determine if ESMTP is supported, if this returns an error code, HELO is tried to use old SMTP. If there is a server that does not support EHLO and does not give an error code back, the connection should be closed and retried with HELO. We do not do that and rather support turning off ESMTP with a setting. The odds of this actually happening are very small since the client will not connect to arbitrary smtp hosts on the internet. Since the client knows that is connects to a host that doesn't support ESMTP/EHLO in that way, the property has to be set to false.
public MailConfig setDisableEsmtp(boolean disableEsmtp)
rfc 1869 states that clients should always attempt EHLO as first command to determine if ESMTP is supported, if this returns an error code, HELO is tried to use old SMTP. If there is a server that does not support EHLO and does not give an error code back, the connection should be closed and retried with HELO. We do not do that and rather support turning off ESMTP with a setting. The odds of this actually happening are very small since the client will not connect to arbitrary smtp hosts on the internet. Since the client knows that is connects to a host that doesn't support ESMTP/EHLO in that way, the property has to be set to false.
disableEsmtp
- the disableEsmtp to set (default is true)public String getUserAgent()
public MailConfig setUserAgent(String userAgent)
It is used to generate the boundary in case of MultiPart email and the Message-ID.
If null
is set, DEFAULT_USER_AGENT is used.
userAgent
- the Mail User Agent(MUA) name used to generate boundary and message id
length of userAgent must be smaller than 40 so that the generated boundary
has no longer 70 characters.public boolean isEnableDKIM()
public MailConfig setEnableDKIM(boolean enableDKIM)
This is used most for temporary disable DKIM without removing DKIM opations from current config.
enableDKIM
- if DKIM Singature should be enabledpublic List<DKIMSignOptions> getDKIMSignOptions()
public MailConfig addDKIMSignOption(DKIMSignOptions dkimSignOptions)
dkimSignOptions
- the DKIMSignOptionspublic MailConfig setDKIMSignOptions(List<DKIMSignOptions> dkimSignOptions)
dkimSignOptions
- the DKIM optionspublic MailConfig setDKIMSignOption(DKIMSignOptions dkimSignOptions)
dkimSignOptions
- the DKIM optionspublic DKIMSignOptions getDKIMSignOption()
public boolean isPipelining()
public MailConfig setPipelining(boolean pipelining)
pipelining
- enable pipelining or notpublic boolean isMultiPartOnly()
public MailConfig setMultiPartOnly(boolean multiPartOnly)
true
, the mail message will be encoded as multipart even for simple mails without
attachments, see https://github.com/vert-x3/vertx-mail-client/issues/161.multiPartOnly
- encoded as multipart only or not, default to false
.public int getPoolCleanerPeriod()
public MailConfig setPoolCleanerPeriod(int poolCleanerPeriod)
poolCleanerPeriod
- the pool cleaner periodpublic int getKeepAliveTimeout()
public MailConfig setKeepAliveTimeout(int keepAliveTimeout)
0
means there is no timeout.keepAliveTimeout
- the timeout, in secondspublic TimeUnit getPoolCleanerPeriodUnit()
TimeUnit
of pool cleaning period. Defaults to TimeUnit.MILLISECONDS
TimeUnit
of the pool cleaning period.public MailConfig setPoolCleanerPeriodUnit(TimeUnit poolCleanerPeriodUnit)
TimeUnit
of pool cleaning period.poolCleanerPeriodUnit
- the TimeUnit
of the pool cleaning period.public TimeUnit getKeepAliveTimeoutUnit()
TimeUnit
of keeping the connections alive timeout. Defaults to TimeUnit.SECONDS
TimeUnit
of keeping the connections alive timeoutpublic MailConfig setKeepAliveTimeoutUnit(TimeUnit keepAliveTimeoutUnit)
TimeUnit
of keeping connections in the pool alive.keepAliveTimeoutUnit
- the TimeUnit
of keeping the connections alive timeoutpublic String getNtDomain()
public MailConfig setNtDomain(String ntDomain)
ntDomain
- the NTLM domainpublic String getWorkstation()
public MailConfig setWorkstation(String workstation)
workstation
- the workstationpublic io.vertx.core.json.JsonObject toJson()
toJson
in class io.vertx.core.net.ClientOptionsBase
Copyright © 2022 Eclipse. All rights reserved.