Interface MailServerCfg

  • All Superinterfaces:
    Configuration

    public interface MailServerCfg
    extends Configuration
    A server-side interface for querying Mail Server settings.

    Mail Servers are used to define how to connect and authenticate to an external mail server.

    • Method Detail

      • configurationClass

        Class<? extends MailServerCfg> configurationClass()
        Gets the configuration class associated with this Mail Server.
        Specified by:
        configurationClass in interface Configuration
        Returns:
        Returns the configuration class associated with this Mail Server.
      • addChangeListener

        void addChangeListener​(ConfigurationChangeListener<MailServerCfg> listener)
        Register to be notified when this Mail Server is changed.
        Parameters:
        listener - The Mail Server configuration change listener.
      • removeChangeListener

        void removeChangeListener​(ConfigurationChangeListener<MailServerCfg> listener)
        Deregister an existing Mail Server configuration change listener.
        Parameters:
        listener - The Mail Server configuration change listener.
      • getAuthPassword

        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.
      • getAuthUsername

        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.
      • isEnabled

        boolean isEnabled()
        Gets the "enabled" property.

        Indicates whether the Mail Server is enabled.

        Returns:
        Returns the value of the "enabled" property.
      • getSmtpProperty

        SortedSet<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 an unmodifiable set containing the values of the "smtp-property" property.
      • getSmtpServer

        String 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.
      • getTrustManagerProvider

        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.
      • getTrustManagerProviderDn

        Dn getTrustManagerProviderDn()
        Gets the "trust-manager-provider" property as a DN.

        Specifies the name of the trust manager that should be used when negotiating SSL connections with remote mail servers.

        Returns:
        Returns the DN value of the "trust-manager-provider" property.
      • isUseSsl

        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.
      • isUseStartTls

        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.