All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SmtpPanel extends JPanel
Class to build gui-components for SMTP-sampler. Getter-methods serve the input-data to the sampler-object, which provides them to the SendMailCommand-object.
See Also:
  • Constructor Details

    • SmtpPanel

      public SmtpPanel()
      Creates new form SmtpPanel, standard constructor. Calls initComponents();.
  • Method Details

    • getMailFrom

      public String getMailFrom()
      Returns sender-address for e-mail from textfield
      Returns:
      Sender
    • getReceiverTo

      public String getReceiverTo()
      Returns receiver in field "to" from textfield
      Returns:
      Receiver "to"
    • getReceiverCC

      public String getReceiverCC()
      Returns receiver in field "cc" from textfield
      Returns:
      Receiver "cc"
    • getReceiverBCC

      public String getReceiverBCC()
      Returns receiver in field "bcc" from textfield
      Returns:
      Receiver "bcc"
    • getBody

      public String getBody()
      Returns message body, i.e. main-mime-part of message (from textfield)
      Returns:
      Message body
    • setBody

      public void setBody(String messageBodyText)
      Sets message body, i.e. main-mime-part of message in textfield
      Parameters:
      messageBodyText - Message body
    • setMailFrom

      public void setMailFrom(String mailFrom)
      Sets sender-address of e-mail in textfield
      Parameters:
      mailFrom - Sender
    • setReceiverTo

      public void setReceiverTo(String mailTo)
      Sets receiver in textfield "to"
      Parameters:
      mailTo - Receiver "to"
    • setReceiverCC

      public void setReceiverCC(String mailToCC)
      Sets receiver in textfield "cc"
      Parameters:
      mailToCC - Receiver "cc"
    • setReceiverBCC

      public void setReceiverBCC(String mailToBCC)
      Sets receiver in textfield "bcc"
      Parameters:
      mailToBCC - Receiver "bcc"
    • getAttachments

      public String getAttachments()
      Returns path of file(s) to be attached in e-mail from textfield
      Returns:
      File to attach
    • setAttachments

      public void setAttachments(String attachments)
      Sets path of file to be attached in e-mail in textfield
      Parameters:
      attachments - File to attach
    • getPort

      public String getPort()
      Returns port of mail-server (standard 25 for SMTP/SMTP with StartTLS, 465 for SSL) from textfield
      Returns:
      Mail-server port
    • setPort

      public void setPort(String port)
      Sets port of mail-server
      Parameters:
      port - Mail-server port
    • getServer

      public String getServer()
      Returns mail-server to be used to send message (from textfield)
      Returns:
      FQDN or IP of mail-server
    • setServer

      public void setServer(String server)
      Sets mail-server to be used to send message in textfield
      Parameters:
      server - FQDN or IP of mail-server
    • getTimeout

      public String getTimeout()
      Returns timeout for SMTP connection from textfield
      Returns:
      Smtp timeout
    • setTimeout

      public void setTimeout(String timeout)
      Sets timeout (ms) for SMTP connection
      Parameters:
      timeout - SMTP Timeout (ms)
    • getConnectionTimeout

      public String getConnectionTimeout()
      Returns connection timeout for SMTP connection from textfield
      Returns:
      SMTP connection timeout
    • setConnectionTimeout

      public void setConnectionTimeout(String connectionTimeout)
      Sets connection timeout (ms) for SMTP connection
      Parameters:
      connectionTimeout - SMTP Connection Timeout (ms)
    • getSubject

      public String getSubject()
      Returns subject of the e-mail from textfield
      Returns:
      Subject of e-mail
    • setSubject

      public void setSubject(String subject)
      Sets subject of the e-mail in textfield
      Parameters:
      subject - Subject of e-mail
    • isSuppressSubject

      public boolean isSuppressSubject()
      Returns true if subject header should be suppressed
      Returns:
      true if subject header should be suppressed
    • setSuppressSubject

      public void setSuppressSubject(boolean emptySubject)
      Sets the property that defines if the subject header should be suppressed
      Parameters:
      emptySubject - flag whether subject header should be suppressed
    • isPlainBody

      public boolean isPlainBody()
      Returns true if message body should be plain (i.e. not multipart/mixed)
      Returns:
      true if using plain message body (i.e. not multipart/mixed)
    • setPlainBody

      public void setPlainBody(boolean plainBody)
      Sets the property that defines if the body should be plain (i.e. not multipart/mixed)
      Parameters:
      plainBody - whether to use a plain body (i.e. not multipart/mixed)
    • isUseAuth

      public boolean isUseAuth()
      Returns if mail-server needs authentication (checkbox)
      Returns:
      true if authentication is used
    • setUseAuth

      public void setUseAuth(boolean selected)
      Set whether mail server needs auth.
      Parameters:
      selected - flag whether mail server needs auth
    • isEnableDebug

      public boolean isEnableDebug()
    • setEnableDebug

      public void setEnableDebug(boolean selected)
    • isUseEmlMessage

      public boolean isUseEmlMessage()
      Returns if an .eml-message is sent instead of the content of message-text area
      Returns:
      true if .eml is sent, false if text area content is sent in e-mail
    • setUseEmlMessage

      public void setUseEmlMessage(boolean useEmlMessage)
      Set the use of an .eml-message instead of the content of message-text area
      Parameters:
      useEmlMessage - Use eml message
    • getEmlMessage

      public String getEmlMessage()
      Returns path to eml message to be sent
      Returns:
      path to eml message to be sent
    • setEmlMessage

      public void setEmlMessage(String emlMessage)
      Set path to eml message to be sent
      Parameters:
      emlMessage - path to eml message to be sent
    • isIncludeTimestamp

      public boolean isIncludeTimestamp()
      Returns if current timestamp is included in the subject (checkbox)
      Returns:
      true if current timestamp is included in subject
    • setIncludeTimestamp

      public void setIncludeTimestamp(boolean includeTimestamp)
      Set timestamp to be included in the message-subject (checkbox)
      Parameters:
      includeTimestamp - Should timestamp be included in subject?
    • isMessageSizeStatistics

      public boolean isMessageSizeStatistics()
      Returns if message size statistics are processed. Output of processing will be included in sample result. (checkbox)
      Returns:
      True if message size will be calculated
    • setMessageSizeStatistic

      public void setMessageSizeStatistic(boolean val)
      Set message size to be calculated and included in sample result (checkbox)
      Parameters:
      val - Should message size be calculated?
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String authPassword)
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • getHeaderFields

      public CollectionProperty getHeaderFields()
    • setHeaderFields

      public void setHeaderFields(CollectionProperty fields)
    • getMailReplyTo

      public String getMailReplyTo()
    • setMailReplyTo

      public void setMailReplyTo(String replyTo)
    • clear

      public void clear()
      Reset all the Gui fields.
    • getSecuritySettingsPanel

      public SecuritySettingsPanel getSecuritySettingsPanel()
    • setSecuritySettingsPanel

      public void setSecuritySettingsPanel(SecuritySettingsPanel securitySettingsPanel)