@ConfigRoot(name="mailer", phase=RUN_TIME) public class MailConfig extends Object
Modifier and Type | Field and Description |
---|---|
Optional<String> |
authMethods
Set the allowed auth methods.
|
Optional<String> |
bounceAddress
Configures the default bounce email address.
|
boolean |
disableEsmtp
Disable ESMTP.
|
Optional<String> |
from
Configure the default `from` attribute.
|
String |
host
The SMTP host name.
|
boolean |
keepAlive
Set if connection pool is enabled,
true by default. |
Optional<String> |
keyStore
Set the key store.
|
Optional<String> |
keyStorePassword
Set the key store password.
|
Optional<String> |
login
Set the login mode for the connection.
|
OptionalInt |
maxPoolSize
Configures the maximum allowed number of open connections to the mail server
If not set the default is
10 . |
Optional<Boolean> |
mock
Enables the mock mode, not sending emails.
|
Optional<String> |
ownHostName
The hostname to be used for HELO/EHLO and the Message-ID
|
Optional<String> |
password
The password.
|
OptionalInt |
port
The SMTP port.
|
boolean |
ssl
Enables or disables the SSL on connect.
|
Optional<String> |
startTLS
Set the TLS security mode for the connection.
|
boolean |
trustAll
Set whether to trust all certificates on ssl connect the option is also
applied to
STARTTLS operation. |
Optional<String> |
username
The username.
|
Constructor and Description |
---|
MailConfig() |
@ConfigItem public Optional<String> from
@ConfigItem public Optional<Boolean> mock
Disabled by default on PROD, enabled by default on DEV and TEST modes.
@ConfigItem public Optional<String> bounceAddress
@ConfigItem(defaultValue="localhost") public String host
@ConfigItem public OptionalInt port
@ConfigItem public boolean ssl
false
by default.@ConfigItem public boolean trustAll
STARTTLS
operation. false
by default.@ConfigItem public OptionalInt maxPoolSize
10
.@ConfigItem public Optional<String> ownHostName
@ConfigItem(defaultValue="true") public boolean keepAlive
true
by default.
If the connection pooling is disabled, the max number of sockets is enforced nevertheless.
@ConfigItem public boolean disableEsmtp
false
by default.
The 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 the regular SMTP command.@ConfigItem public Optional<String> startTLS
DISABLED
, OPTIONAL
or REQUIRED
.@ConfigItem public Optional<String> login
DISABLED
, @{code OPTIONAL} or REQUIRED
@ConfigItem public Optional<String> authMethods
Copyright © 2019 JBoss by Red Hat. All rights reserved.