Interface IMailConfig


  • @StableMinor(version="14.0",
                 sinceVersion="4.0")
    public interface IMailConfig
    Stores the configuration for the sendmail component.
    Since:
    4.0.4
    Version:
    $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
    • Method Detail

      • getQueueLockTimeout

        int getQueueLockTimeout()
        Returns the time in seconds for mail queue lock timeout. The queue is locked for processing, and this timeout is necessary to unlock the queue if its processing thread has died.
        Returns:
        the time in seconds for mail queue lock timeout.
        Since:
        4.0.4
      • setQueueLockTimeout

        void setQueueLockTimeout​(int queueLockTimeout)
        Sets the time in seconds for mail queue lock timeout.
        Parameters:
        queueLockTimeout - the value to set.
        Since:
        4.0.4
        See Also:
        getQueueLockTimeout()
      • getRemoveMailsSent

        boolean getRemoveMailsSent()
        Returns true if mails sent successfully should be automatically removed from the database.
        Returns:
        true if the mails sent should be removed, false otherwise.
        Since:
        4.0.4
      • setRemoveMailsSent

        void setRemoveMailsSent​(boolean remove)
        Sets if mails sent successfully should be automatically removed from the database.
        Parameters:
        remove - the value to set.
        Since:
        4.0.4
      • getBlockInterval

        int getBlockInterval()
        Returns the interval, in seconds, to wait when a block of getBlockSize() mails are sent.
        Returns:
        the interval set.
        Since:
        4.0.4
      • setBlockInterval

        void setBlockInterval​(int blockInterval)
        Sets the interval, in seconds, to wait when a block of getBlockSize() mails are sent.
        Parameters:
        blockInterval - the interval value to set.
        Since:
        4.0.4
      • getBlockSize

        int getBlockSize()
        Returns the block size. The block size is the number of mails sent that represents a block.
        Returns:
        the block size.
        Since:
        4.0.4
      • setBlockSize

        void setBlockSize​(int blockSize)
        Sets the block size.
        Parameters:
        blockSize - the block size value.
        Since:
        4.0.4
        See Also:
        getBlockSize()
      • getDefaultFromAddress

        String getDefaultFromAddress()
        Returns the default from e-mail address, that will be used if no from is specified for a e-mail to be sent. If this default address is also not set, no from address will be set in the e-mail header.
        Returns:
        the default from e-mail address.
        Since:
        4.0.8
      • setDefaultFromAddress

        void setDefaultFromAddress​(String defaultFromAddress)
        Sets the default from address.
        Parameters:
        defaultFromAddress - the default from address.
        Since:
        4.0.8
        See Also:
        getDefaultFromAddress()
      • getMaxSendThreads

        int getMaxSendThreads()
        Returns the maximum number of threads to process the sendmail queue.
        Returns:
        the maximum number of threads to process the sendmail queue.
        Since:
        4.0.4
      • setMaxSendThreads

        void setMaxSendThreads​(int maxSendThreads)
        Sets the maximum number of threads to process the sendmail queue.
        Parameters:
        maxSendThreads - the value to set.
        Since:
        4.0.4
      • getSendInterval

        int getSendInterval()
        Returns the interval, in seconds, to wait between each mail send in a thread processing the sendmail queue.
        Returns:
        the interval, in seconds.
        Since:
        4.0.4
      • setSendInterval

        void setSendInterval​(int sendInterval)
        Sets the interval, in seconds, to wait between each mail send in a thread processing the sendmail queue.
        Parameters:
        sendInterval - the interval, in seconds.
        Since:
        4.0.4
      • getSmtpHost

        String getSmtpHost()
        Returns the smtp server hostname.
        Returns:
        the smtp server hostname.
        Since:
        4.0.4
      • setSmtpHost

        void setSmtpHost​(String smtpHost)
        Sets the smtp server hostname.
        Parameters:
        smtpHost - the value to set.
        Since:
        4.0.4
      • getSmtpPassword

        String getSmtpPassword()
        Returns the smtp server authentication password.
        Returns:
        the smtp server authentication password.
        Since:
        4.0.4
      • setSmtpPassword

        void setSmtpPassword​(String smtpPassword)
        Sets the smtp server authentication password.
        Parameters:
        smtpPassword - the password value.
        Since:
        4.0.4
      • getSmtpPort

        int getSmtpPort()
        Returns the smtp server connection port.
        Returns:
        the smtp server connection port.
        Since:
        4.0.4
      • setSmtpPort

        void setSmtpPort​(int smtpPort)
        Sets the smtp server connection port.
        Parameters:
        smtpHost - the value to set.
        Since:
        4.0.4
      • getCryptographicProtocol

        IMailConfig.CryptographicProtocol getCryptographicProtocol()
        Returns the cryptographic protocol to be used.
        Returns:
        SSL or TLS
        Since:
        5.6.0
      • setCryptographicProtocol

        void setCryptographicProtocol​(IMailConfig.CryptographicProtocol protocol)
        Sets the cryptographic protocol to be used.
        Parameters:
        protocol - the string representing the protocol to be used (NONE, SSL or TLS).
        Since:
        5.6.0
      • getSocketConnectionTimeout

        int getSocketConnectionTimeout()
        Returns the socket connection timeout value in milliseconds. 0 (zero) meaning infinite timeout.
        Returns:
        the socket connection timeout value in milliseconds.
        Since:
        5.6.0
      • setSocketConnectionTimeout

        void setSocketConnectionTimeout​(int socketConnectionTimeout)
        Sets the Socket connection timeout value in milliseconds. Use 0 (zero) to infinite timeout.
        Parameters:
        smtpConnectionTimeout - the value to set.
        Since:
        5.6.0
      • getSocketTimeout

        int getSocketTimeout()
        Returns the socket I/O timeout value in milliseconds.
        Returns:
        the socket I/O timeout value in milliseconds.
        Since:
        5.6.0
      • setSocketTimeout

        void setSocketTimeout​(int socketTimeout)
        Sets the socket I/O timeout value in milliseconds.
        Parameters:
        smtpTimeout - the value to set.
        Since:
        5.6.0
      • getSmtpUser

        String getSmtpUser()
        Returns the smtp server authentication user.
        Returns:
        the smtp server authentication user.
        Since:
        4.0.4
      • setSmtpUser

        void setSmtpUser​(String smtpUser)
        Sets the smtp server authentication user.
        Parameters:
        smtpUser - the smtp server authentication user, or null if no authentication is to be used.
        Since:
        4.0.4
      • getMailSenderClass

        String getMailSenderClass()
        Returns the class that should be used for sending mails. It must implement IMailSender.
        Returns:
        the class to be used for sending mails.
        Since:
        4.0.4
      • setMailSenderClass

        void setMailSenderClass​(String className)
        Sets the class that should be used for sending mails. It must implement IMailSender.
        Parameters:
        className - the class name to set.
        Since:
        4.0.4