Interface MailServerCfgClient
- All Superinterfaces:
ConfigurationClient
Mail Servers are used to define how to connect and authenticate to an external mail server.
-
Method Summary
Modifier and TypeMethodDescriptionManagedObjectDefinition<? extends MailServerCfgClient,
? extends MailServerCfg> Get the configuration definition associated with this Mail Server.Gets the "auth-password" property.Gets the "auth-username" property.Gets the "smtp-property" property.Gets the "smtp-server" property.Gets the "trust-manager-provider" property.Gets the "enabled" property.isUseSsl()
Gets the "use-ssl" property.Gets the "use-start-tls" property.void
setAuthPassword
(ValueOrExpression<String> value) Sets the "auth-password" property.void
setAuthUsername
(ValueOrExpression<String> value) Sets the "auth-username" property.void
setEnabled
(ValueOrExpression<Boolean> value) Sets the "enabled" property.void
setSmtpProperty
(Collection<ValueOrExpression<String>> values) Sets the "smtp-property" property.void
setSmtpServer
(ValueOrExpression<String> value) Sets the "smtp-server" property.void
Sets the "trust-manager-provider" property.void
setUseSsl
(ValueOrExpression<Boolean> value) Sets the "use-ssl" property.void
setUseStartTls
(ValueOrExpression<Boolean> value) Sets the "use-start-tls" property.Methods inherited from interface org.forgerock.opendj.config.ConfigurationClient
commit, properties
-
Method Details
-
definition
ManagedObjectDefinition<? extends MailServerCfgClient,? extends MailServerCfg> definition()Get the configuration definition associated with this Mail Server.- Specified by:
definition
in interfaceConfigurationClient
- Returns:
- Returns the configuration definition associated with this Mail Server.
-
getAuthPassword
ValueOrExpression<String> getAuthPassword()Gets the "auth-password" property.Specifies the password for authenticating to the SMTP server. You must also set the auth-name.
- Returns:
- Returns the value of the "auth-password" property.
-
setAuthPassword
Sets the "auth-password" property.Specifies the password for authenticating to the SMTP server. You must also set the auth-name.
- Parameters:
value
- The value of the "auth-password" property.- Throws:
PropertyException
- If the new value is invalid.
-
getAuthUsername
ValueOrExpression<String> getAuthUsername()Gets the "auth-username" property.Specifies the username for authenticating to the SMTP server.
- Returns:
- Returns the value of the "auth-username" property.
-
setAuthUsername
Sets the "auth-username" property.Specifies the username for authenticating to the SMTP server.
- Parameters:
value
- The value of the "auth-username" property.- Throws:
PropertyException
- If the new value is invalid.
-
isEnabled
Gets the "enabled" property.Indicates whether the Mail Server is enabled.
- Returns:
- Returns the value of the "enabled" property.
-
setEnabled
Sets the "enabled" property.Indicates whether the Mail Server is enabled.
- Parameters:
value
- The value of the "enabled" property.- Throws:
PropertyException
- If the new value is invalid.
-
getSmtpProperty
SortedSet<ValueOrExpression<String>> getSmtpProperty()Gets the "smtp-property" property.Specifies additional options to pass when submitting messages.
Any supported property can be specified here. Refer to the documentation at https://javaee.github.io/javamail/docs/api/javax/mail/package-summary.html#properties for further information on related properties, their implications, and range values. Note these extra properties will be added after the normal properties are set for this Mail Server.
- Returns:
- Returns the values of the "smtp-property" property.
-
setSmtpProperty
Sets the "smtp-property" property.Specifies additional options to pass when submitting messages.
Any supported property can be specified here. Refer to the documentation at https://javaee.github.io/javamail/docs/api/javax/mail/package-summary.html#properties for further information on related properties, their implications, and range values. Note these extra properties will be added after the normal properties are set for this Mail Server.
- Parameters:
values
- The values of the "smtp-property" property.- Throws:
PropertyException
- If one or more of the new values are invalid.
-
getSmtpServer
Gets the "smtp-server" property.Specifies the address (and optional port number) for a mail server that can be used to send email messages via SMTP.
It may be an IP address or resolvable hostname, optionally followed by a colon and a port number.
- Returns:
- Returns the value of the "smtp-server" property.
-
setSmtpServer
Sets the "smtp-server" property.Specifies the address (and optional port number) for a mail server that can be used to send email messages via SMTP.
It may be an IP address or resolvable hostname, optionally followed by a colon and a port number.
- Parameters:
value
- The value of the "smtp-server" property.- Throws:
PropertyException
- If the new value is invalid.
-
getTrustManagerProvider
ValueOrExpression<String> getTrustManagerProvider()Gets the "trust-manager-provider" property.Specifies the name of the trust manager that should be used when negotiating SSL connections with remote mail servers.
- Returns:
- Returns the value of the "trust-manager-provider" property.
-
setTrustManagerProvider
Sets the "trust-manager-provider" property.Specifies the name of the trust manager that should be used when negotiating SSL connections with remote mail servers.
- Parameters:
value
- The value of the "trust-manager-provider" property.- Throws:
PropertyException
- If the new value is invalid.
-
isUseSsl
ValueOrExpression<Boolean> isUseSsl()Gets the "use-ssl" property.Indicates whether the Mail Server should use SSL.
If enabled, the Mail Server will use SSL to encrypt communication with the clients.
Default value:
false
- Returns:
- Returns the value of the "use-ssl" property.
-
setUseSsl
Sets the "use-ssl" property.Indicates whether the Mail Server should use SSL.
If enabled, the Mail Server will use SSL to encrypt communication with the clients.
- Parameters:
value
- The value of the "use-ssl" property.- Throws:
PropertyException
- If the new value is invalid.
-
isUseStartTls
ValueOrExpression<Boolean> isUseStartTls()Gets the "use-start-tls" property.Indicates whether to use StartTLS.
If enabled, the Mail Server will use the StartTLS command after connecting to initiate secure communication over an otherwise insecure channel. Note that this is only allowed if the Mail Server is not configured to use SSL.
Default value:
true
- Returns:
- Returns the value of the "use-start-tls" property.
-
setUseStartTls
Sets the "use-start-tls" property.Indicates whether to use StartTLS.
If enabled, the Mail Server will use the StartTLS command after connecting to initiate secure communication over an otherwise insecure channel. Note that this is only allowed if the Mail Server is not configured to use SSL.
- Parameters:
value
- The value of the "use-start-tls" property.- Throws:
PropertyException
- If the new value is invalid.
-