Class MailConfigImpl

java.lang.Object
one.jpro.platform.mail.impl.MailConfigImpl
All Implemented Interfaces:
MailConfig
Direct Known Subclasses:
GoogleMailConfig, MailTrapConfig

public class MailConfigImpl extends Object implements MailConfig
Mail configuration implementation.
Author:
Besmir Beqiri
  • Constructor Details

    • MailConfigImpl

      public MailConfigImpl()
  • Method Details

    • getProperties

      @NotNull public @NotNull Properties getProperties()
      Description copied from interface: MailConfig
      Gets the mail properties.
      Specified by:
      getProperties in interface MailConfig
      Returns:
      a Properties object containing mail properties
    • isMailDebug

      public boolean isMailDebug()
      Description copied from interface: MailConfig
      Checks if mail debugging is enabled.
      Specified by:
      isMailDebug in interface MailConfig
      Returns:
      true if mail debugging is enabled, false otherwise
    • setMailDebug

      @NotNull public @NotNull MailConfig setMailDebug(boolean mailDebug)
      Description copied from interface: MailConfig
      Sets the mail debugging option.
      Specified by:
      setMailDebug in interface MailConfig
      Parameters:
      mailDebug - true to enable mail debugging, false to disable it
      Returns:
      the updated MailConfig instance for method chaining
    • getMailSmtpUser

      @NotNull public @NotNull String getMailSmtpUser()
      Description copied from interface: MailConfig
      Gets the SMTP user.
      Specified by:
      getMailSmtpUser in interface MailConfig
      Returns:
      the SMTP user as a string
    • setMailSmtpUser

      @NotNull public @NotNull MailConfig setMailSmtpUser(String mailSmtpUser)
      Description copied from interface: MailConfig
      Sets the SMTP user.
      Specified by:
      setMailSmtpUser in interface MailConfig
      Parameters:
      mailSmtpUser - the SMTP user to set
      Returns:
      the updated MailConfig instance for method chaining
    • getMailSmtpHost

      @NotNull public @NotNull String getMailSmtpHost()
      Description copied from interface: MailConfig
      Gets the SMTP host.
      Specified by:
      getMailSmtpHost in interface MailConfig
      Returns:
      the SMTP host
    • setMailSmtpHost

      @NotNull public @NotNull MailConfig setMailSmtpHost(String mailSmtpHost)
      Description copied from interface: MailConfig
      Sets the SMTP host.
      Specified by:
      setMailSmtpHost in interface MailConfig
      Parameters:
      mailSmtpHost - the SMTP host to set
      Returns:
      the updated MailConfig instance for method chaining
    • getMailSmtpPort

      public int getMailSmtpPort()
      Description copied from interface: MailConfig
      Gets the SMTP port.
      Specified by:
      getMailSmtpPort in interface MailConfig
      Returns:
      the SMTP port
    • setMailSmtpPort

      @NotNull public @NotNull MailConfig setMailSmtpPort(int mailSmtpPort)
      Description copied from interface: MailConfig
      Sets the SMTP port.
      Specified by:
      setMailSmtpPort in interface MailConfig
      Parameters:
      mailSmtpPort - the SMTP port to set
      Returns:
      the updated MailConfig instance for method chaining
    • getMailSmtpConnectionTimeout

      public int getMailSmtpConnectionTimeout()
      Description copied from interface: MailConfig
      Gets the SMTP connection timeout.
      Specified by:
      getMailSmtpConnectionTimeout in interface MailConfig
      Returns:
      the SMTP connection timeout in milliseconds
    • setMailSmtpConnectionTimeout

      @NotNull public @NotNull MailConfig setMailSmtpConnectionTimeout(int mailSmtpConnectionTimeout)
      Description copied from interface: MailConfig
      Sets the SMTP connection timeout.
      Specified by:
      setMailSmtpConnectionTimeout in interface MailConfig
      Parameters:
      mailSmtpConnectionTimeout - the SMTP connection timeout in milliseconds
      Returns:
      the updated MailConfig instance for method chaining
    • getMailSmtpTimeout

      public int getMailSmtpTimeout()
      Description copied from interface: MailConfig
      Gets the SMTP timeout.
      Specified by:
      getMailSmtpTimeout in interface MailConfig
      Returns:
      the SMTP timeout in milliseconds
    • setMailSmtpTimeout

      @NotNull public @NotNull MailConfig setMailSmtpTimeout(int mailSmtpTimeout)
      Description copied from interface: MailConfig
      Sets the SMTP timeout.
      Specified by:
      setMailSmtpTimeout in interface MailConfig
      Parameters:
      mailSmtpTimeout - the SMTP timeout in milliseconds
      Returns:
      the updated MailConfig instance for method chaining
    • isMailSmtpAuth

      public boolean isMailSmtpAuth()
      Description copied from interface: MailConfig
      Checks if SMTP authentication is enabled.
      Specified by:
      isMailSmtpAuth in interface MailConfig
      Returns:
      true if SMTP authentication is enabled, false otherwise
    • setMailSmtpAuth

      @NotNull public @NotNull MailConfig setMailSmtpAuth(boolean mailSmtpAuth)
      Description copied from interface: MailConfig
      Sets the SMTP authentication option.
      Specified by:
      setMailSmtpAuth in interface MailConfig
      Parameters:
      mailSmtpAuth - true to enable SMTP authentication, false to disable
      Returns:
      the updated MailConfig instance for method chaining
    • getMailSmtpAuthMechanisms

      @NotNull public @NotNull String getMailSmtpAuthMechanisms()
      Description copied from interface: MailConfig
      Gets the SMTP authentication mechanisms.
      Specified by:
      getMailSmtpAuthMechanisms in interface MailConfig
      Returns:
      a string representing the SMTP authentication mechanisms
    • setMailSmtpAuthMechanisms

      @NotNull public @NotNull MailConfig setMailSmtpAuthMechanisms(String mailSmtpAuthMechanisms)
      Description copied from interface: MailConfig
      Sets the SMTP authentication mechanisms.
      Specified by:
      setMailSmtpAuthMechanisms in interface MailConfig
      Parameters:
      mailSmtpAuthMechanisms - the SMTP authentication mechanisms to set
      Returns:
      the updated MailConfig instance for method chaining
    • isMailSmtpAuthLoginDisable

      public boolean isMailSmtpAuthLoginDisable()
      Description copied from interface: MailConfig
      Checks if the "AUTH LOGIN" command is disabled.
      Specified by:
      isMailSmtpAuthLoginDisable in interface MailConfig
      Returns:
      true if the "AUTH LOGIN" command is disabled, false otherwise
    • setMailSmtpAuthLoginDisable

      @NotNull public @NotNull MailConfig setMailSmtpAuthLoginDisable(boolean mailSmtpAuthLoginDisable)
      Description copied from interface: MailConfig
      Sets the option to disable the "AUTH LOGIN" command.
      Specified by:
      setMailSmtpAuthLoginDisable in interface MailConfig
      Parameters:
      mailSmtpAuthLoginDisable - true to disable the "AUTH LOGIN" command, false to enable
      Returns:
      the updated MailConfig instance for method chaining
    • isMailSmtpAuthPlainDisable

      public boolean isMailSmtpAuthPlainDisable()
      Description copied from interface: MailConfig
      Checks if the "AUTH PLAIN" command is disabled.
      Specified by:
      isMailSmtpAuthPlainDisable in interface MailConfig
      Returns:
      true if the "AUTH PLAIN" command is disabled, false otherwise
    • setMailSmtpAuthPlainDisable

      @NotNull public @NotNull MailConfig setMailSmtpAuthPlainDisable(boolean mailSmtpAuthPlainDisable)
      Description copied from interface: MailConfig
      Sets the option to disable the "AUTH PLAIN" command.
      Specified by:
      setMailSmtpAuthPlainDisable in interface MailConfig
      Parameters:
      mailSmtpAuthPlainDisable - true to disable the "AUTH PLAIN" command, false to enable
      Returns:
      the updated MailConfig instance for method chaining
    • isMailSmtpAuthDigestMd5Disable

      public boolean isMailSmtpAuthDigestMd5Disable()
      Description copied from interface: MailConfig
      Checks if the "AUTH DIGEST-MD5" command is disabled.
      Specified by:
      isMailSmtpAuthDigestMd5Disable in interface MailConfig
      Returns:
      true if the "AUTH DIGEST-MD5" command is disabled, false otherwise
    • setMailSmtpAuthDigestMd5Disable

      @NotNull public @NotNull MailConfig setMailSmtpAuthDigestMd5Disable(boolean mailSmtpAuthDigestMd5Disable)
      Description copied from interface: MailConfig
      Sets the option to disable the "AUTH DIGEST-MD5" command.
      Specified by:
      setMailSmtpAuthDigestMd5Disable in interface MailConfig
      Parameters:
      mailSmtpAuthDigestMd5Disable - true to disable the "AUTH DIGEST-MD5" command, false to enable
      Returns:
      the updated MailConfig instance for method chaining
    • isMailSmtpAuthXOAuth2Disable

      public boolean isMailSmtpAuthXOAuth2Disable()
      Description copied from interface: MailConfig
      Checks if the "AUTH XOAUTH2" command is disabled.
      Specified by:
      isMailSmtpAuthXOAuth2Disable in interface MailConfig
      Returns:
      true if the "AUTH XOAUTH2" command is disabled, false otherwise
    • setMailSmtpAuthXOAuth2Disable

      @NotNull public @NotNull MailConfig setMailSmtpAuthXOAuth2Disable(boolean mailSmtpAuthXOAuth2Disable)
      Description copied from interface: MailConfig
      Sets the option to disable the "AUTH XOAUTH2" command.
      Specified by:
      setMailSmtpAuthXOAuth2Disable in interface MailConfig
      Parameters:
      mailSmtpAuthXOAuth2Disable - true to disable the "AUTH XOAUTH2" command, false to enable
      Returns:
      the updated MailConfig instance for method chaining
    • getMailSmtpStartTLS

      @NotNull public @NotNull StartTLSOption getMailSmtpStartTLS()
      Description copied from interface: MailConfig
      Gets the STARTTLS option.
      Specified by:
      getMailSmtpStartTLS in interface MailConfig
      Returns:
      the STARTTLS option
    • setMailSmtpStartTLS

      @NotNull public @NotNull MailConfig setMailSmtpStartTLS(StartTLSOption mailSmtpStarttls)
      Description copied from interface: MailConfig
      Sets the STARTTLS option.
      Specified by:
      setMailSmtpStartTLS in interface MailConfig
      Parameters:
      mailSmtpStarttls - the STARTTLS option to set
      Returns:
      the updated MailConfig instance for method chaining
    • isMailSmtpSslEnable

      public boolean isMailSmtpSslEnable()
      Description copied from interface: MailConfig
      Checks if SSL is enabled for SMTP.
      Specified by:
      isMailSmtpSslEnable in interface MailConfig
      Returns:
      true if SSL is enabled, false otherwise
    • setMailSmtpSslEnable

      @NotNull public @NotNull MailConfig setMailSmtpSslEnable(boolean mailSmtpSslEnable)
      Description copied from interface: MailConfig
      Sets the option to enable SSL for SMTP.
      Specified by:
      setMailSmtpSslEnable in interface MailConfig
      Parameters:
      mailSmtpSslEnable - true to enable SSL, false to disable
      Returns:
      the updated MailConfig instance for method chaining
    • isMailSmtpSslCheckServerIdentity

      public boolean isMailSmtpSslCheckServerIdentity()
      Description copied from interface: MailConfig
      Checks if the server identity is checked for SMTP SSL.
      Specified by:
      isMailSmtpSslCheckServerIdentity in interface MailConfig
      Returns:
      true if the server identity is checked, false otherwise
    • setMailSmtpSslCheckServerIdentity

      @NotNull public @NotNull MailConfig setMailSmtpSslCheckServerIdentity(boolean mailSmtpSslCheckServerIdentity)
      Description copied from interface: MailConfig
      Sets the option to check the server identity for SMTP SSL.
      Specified by:
      setMailSmtpSslCheckServerIdentity in interface MailConfig
      Parameters:
      mailSmtpSslCheckServerIdentity - true to check the server identity, false to disable
      Returns:
      the updated MailConfig instance for method chaining
    • getMailSmtpSslTrust

      @NotNull public @NotNull String getMailSmtpSslTrust()
      Description copied from interface: MailConfig
      Gets the SMTP SSL trust setting.
      Specified by:
      getMailSmtpSslTrust in interface MailConfig
      Returns:
      a string representing the SMTP SSL trust setting
    • setMailSmtpSslTrust

      @NotNull public @NotNull MailConfig setMailSmtpSslTrust(String mailSmtpSslTrust)
      Description copied from interface: MailConfig
      Sets the SMTP SSL trust setting.
      Specified by:
      setMailSmtpSslTrust in interface MailConfig
      Parameters:
      mailSmtpSslTrust - the SMTP SSL trust setting to set
      Returns:
      the updated MailConfig instance for method chaining