Package io.quarkus.mailer.runtime
Class MailConfig
- java.lang.Object
-
- io.quarkus.mailer.runtime.MailConfig
-
@ConfigRoot(name="mailer", phase=RUN_TIME) public class MailConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description booleanallowRcptErrorsSets if sending allows recipients errors.Optional<String>authMethodsSets the allowed authentication methods.Optional<String>bounceAddressSets the default bounce email address.booleandisableEsmtpDisable ESMTP.DkimSignOptionsConfigdkimConfigures DKIM signature verification.Optional<String>fromSets the default `from` attribute when not specified in theMailinstance.StringhostSets the SMTP host name.booleankeepAliveSets if connection pool is enabled.DurationkeepAliveTimeoutSet the keep alive timeout for the SMTP connection.Optional<String>keyStoreDeprecated.Use {truststoreinstead.Optional<String>keyStorePasswordDeprecated.Use {truststoreinstead.StringloginSets the login mode for the connection.intmaxPoolSizeSets the max number of open connections to the mail server.Optional<Boolean>mockEnables the mock mode.booleanmultiPartOnlyWhether the mail should always been sent as multipart even if they don't have attachments.NtlmConfigntlmConfigures NTLM (Windows New Technology LAN Manager).Optional<String>ownHostNameSets the hostname to be used for HELO/EHLO and the Message-ID.Optional<String>passwordSets the password to connect to the SMTP server.booleanpipeliningEnables or disables the pipelining capability if the SMTP server supports it.DurationpoolCleanerPeriodSets the connection pool cleaner period.OptionalIntportThe SMTP port.booleansslEnables or disables the TLS/SSL.StringstartTLSSets the TLS security mode for the connection.Optional<Boolean>trustAllSet whether all server certificates should be trusted.TrustStoreConfigtruststoreConfigures the trust store.Optional<String>usernameSets the username to connect to the SMTP server.
-
Constructor Summary
Constructors Constructor Description MailConfig()
-
-
-
Field Detail
-
from
@ConfigItem public Optional<String> from
Sets the default `from` attribute when not specified in theMailinstance. It's the sender email address.
-
mock
@ConfigItem public Optional<Boolean> mock
Enables the mock mode. When enabled, mails are not sent, but stored in an in-memory mailbox. The content of the emails is also printed on the console.Disabled by default on PROD, enabled by default on DEV and TEST modes.
-
bounceAddress
@ConfigItem public Optional<String> bounceAddress
Sets the default bounce email address. A bounced email, or bounce, is an email message that gets rejected by a mail server.
-
host
@ConfigItem(defaultValue="localhost") public String host
Sets the SMTP host name.
-
port
@ConfigItem public OptionalInt port
The SMTP port. The default value depends on the configuration. The port 25 is used as default whensslis disabled. This port continues to be used primarily for SMTP relaying. SMTP relaying is the transmission of email from email server to email server. The port 587 is the default port whensslis enabled. It ensures that email is submitted securely. Note that the port 465 may be used by SMTP servers, however, IANA has reassigned a new service to this port, and it should no longer be used for SMTP communications.
-
username
@ConfigItem public Optional<String> username
Sets the username to connect to the SMTP server.
-
password
@ConfigItem public Optional<String> password
Sets the password to connect to the SMTP server.
-
ssl
@ConfigItem(defaultValue="false") public boolean ssl
Enables or disables the TLS/SSL.
-
trustAll
@ConfigItem public Optional<Boolean> trustAll
Set whether all server certificates should be trusted. This option is only used whensslis enabled.
-
maxPoolSize
@ConfigItem(defaultValue="10") public int maxPoolSize
Sets the max number of open connections to the mail server.
-
ownHostName
@ConfigItem public Optional<String> ownHostName
Sets the hostname to be used for HELO/EHLO and the Message-ID.
-
keepAlive
@ConfigItem(defaultValue="true") public boolean keepAlive
Sets if connection pool is enabled. If the connection pooling is disabled, the max number of sockets is enforced nevertheless.
-
disableEsmtp
@ConfigItem(defaultValue="false") public boolean disableEsmtp
Disable ESMTP. The RFC-1869 states that clients should always attemptEHLOas first command to determine if ESMTP is supported, if this returns an error code,HELOis tried to use the regular SMTP command.
-
startTLS
@ConfigItem(defaultValue="OPTIONAL") public String startTLS
Sets the TLS security mode for the connection. EitherDISABLED,OPTIONALorREQUIRED.
-
dkim
@ConfigItem public DkimSignOptionsConfig dkim
Configures DKIM signature verification.
-
login
@ConfigItem(defaultValue="NONE") public String login
Sets the login mode for the connection. EitherNONE, @{code DISABLED},OPTIONAL,REQUIREDorXOAUTH2.- DISABLED means no login will be attempted
- NONE means a login will be attempted if the server supports in and login credentials are set
- REQUIRED means that a login will be attempted if the server supports it and the send operation will fail otherwise
- XOAUTH2 means that a login will be attempted using Google Gmail Oauth2 tokens
-
authMethods
@ConfigItem public Optional<String> authMethods
Sets the allowed authentication methods. These methods will be used only if the server supports them. If not set, all supported methods may be used. The list is given as a space separated list, such asDIGEST-MD5 CRAM-SHA256 CRAM-SHA1 CRAM-MD5 PLAIN LOGIN.
-
keyStore
@Deprecated @ConfigItem public Optional<String> keyStore
Deprecated.Use {truststoreinstead.Set the trust store.
-
keyStorePassword
@ConfigItem @Deprecated public Optional<String> keyStorePassword
Deprecated.Use {truststoreinstead.Sets the trust store password if any.
-
truststore
@ConfigItem public TrustStoreConfig truststore
Configures the trust store.
-
multiPartOnly
@ConfigItem(defaultValue="false") public boolean multiPartOnly
Whether the mail should always been sent as multipart even if they don't have attachments. When sets to true, the mail message will be encoded as multipart even for simple mails without attachments.
-
allowRcptErrors
@ConfigItem(defaultValue="false") public boolean allowRcptErrors
Sets if sending allows recipients errors. If set to true, the mail will be sent to the recipients that the server accepted, if any.
-
pipelining
@ConfigItem(defaultValue="true") public boolean pipelining
Enables or disables the pipelining capability if the SMTP server supports it.
-
poolCleanerPeriod
@ConfigItem(defaultValue="PT1S") public Duration poolCleanerPeriod
Sets the connection pool cleaner period. Zero disables expiration checks and connections will remain in the pool until they are closed.
-
keepAliveTimeout
@ConfigItem(defaultValue="PT300S") public Duration keepAliveTimeout
Set the keep alive timeout for the SMTP connection. This value determines how long a connection remains unused in the pool before being evicted and closed. A timeout of 0 means there is no timeout.
-
ntlm
@ConfigItem public NtlmConfig ntlm
Configures NTLM (Windows New Technology LAN Manager).
-
-