Class MailConfiguration

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class MailConfiguration
    extends java.lang.Object
    implements java.lang.Cloneable

    Configuration-object for the Mailing class.

    This implementation is not synchronized. If used by different threads concurrently, external synchronization is necessary.

    Author:
    sts
    See Also:
    Mailing
    • Constructor Detail

      • MailConfiguration

        public MailConfiguration()
    • Method Detail

      • isDebugEnabled

        public boolean isDebugEnabled()
        Indicates if SMTP debug should be enabled.
        Returns:
        true if SMTP debug should be enabled, false otherwise.
      • setDebugEnabled

        public MailConfiguration setDebugEnabled​(boolean isDebugEnabled)
        Sets if SMTP debug enabled.
        Parameters:
        isDebugEnabled - enabled (true) or disabled (false).
        Returns:
        this instance.
      • getSmtpServer

        public java.lang.String getSmtpServer()
        Returns the SMTP Server URL or IP-address.
        Returns:
        the SMTP Server URL or IP-address
      • setSmtpServer

        public MailConfiguration setSmtpServer​(java.lang.String smtpServer)
        Sets the SMTP server URL or IP-address.
        Parameters:
        smtpServer - URL or IP-address
        Returns:
        this instance.
      • getSmtpUser

        public java.lang.String getSmtpUser()
        Returns the SMTP user name. May be null or empty, if no SMTP authentication should be used.
        Returns:
        the SMTP user name
      • setSmtpUser

        public MailConfiguration setSmtpUser​(java.lang.String smtpUser)
        Sets the SMTP user name of SMTP authentication should be used.
        Parameters:
        smtpUser - SMTP user name.
        Returns:
        this instance.
      • getSmtpPassword

        public java.lang.String getSmtpPassword()
        Returns the SMTP password. May be null or empty, if no SMTP authentication should be used.
        Returns:
        the SMTP password. May be null or empty, if no SMTP authentication should be used.
      • setSmtpPassword

        public MailConfiguration setSmtpPassword​(java.lang.String smtpPassword)
        Sets the SMTP password for SMTP authentication.
        Parameters:
        smtpPassword - the password.
        Returns:
        this instance.
      • getSmtpPort

        public int getSmtpPort()
        Returns the port of the SMTP server.
        Returns:
        the port of the SMTP server
      • setSmtpPort

        public MailConfiguration setSmtpPort​(int smtpPort)
        Sets the port of the SMTP server.
        Parameters:
        smtpPort - the port.
        Returns:
        this instance.
      • isSslEnabled

        public boolean isSslEnabled()
        Indicates if SSL should be used.
        Returns:
        true if SSL should be used, false otherwise.
      • setSslEnabled

        public MailConfiguration setSslEnabled​(boolean isSslEnabled)
        Sets if SSL should be used.
        Parameters:
        isSslEnabled - true, SSL should be used, false otherwise.
        Returns:
        this instance.
      • clone

        public MailConfiguration clone()
        Overrides:
        clone in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object