org.apache.jmeter.protocol.smtp.sampler

## Class SmtpSampler

- java.lang.Object
- - org.apache.jmeter.testelement.AbstractTestElement
  - - org.apache.jmeter.samplers.AbstractSampler
    - - org.apache.jmeter.protocol.smtp.sampler.SmtpSampler

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, ConfigMergabilityIndicator, Searchable, Sampler, TestElement

      public class SmtpSampler
      extends AbstractSampler

  Sampler-Class for JMeter - builds, starts and interprets the results of the sampler. Has to implement some standard-methods for JMeter in order to be integrated in the framework. All getter/setter methods just deliver/set values from/to the sampler, not from/to the message-object. Therefore, all these methods are also present in class SendMailCommand.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ATTACH_FILE`
    `static java.lang.String` | `EML_MESSAGE_TO_SEND`
    `static java.lang.String` | `ENABLE_DEBUG`
    `static java.lang.String` | `FILENAME_SEPARATOR`
    `static java.lang.String` | `HEADER_FIELDS`
    `static java.lang.String` | `INCLUDE_TIMESTAMP`
    `static java.lang.String` | `MAIL_FROM`
    `static java.lang.String` | `MAIL_REPLYTO`
    `static java.lang.String` | `MESSAGE`
    `static java.lang.String` | `MESSAGE_SIZE_STATS`
    `static java.lang.String` | `PASSWORD`
    `static java.lang.String` | `PLAIN_BODY`
    `static java.lang.String` | `RECEIVER_BCC`
    `static java.lang.String` | `RECEIVER_CC`
    `static java.lang.String` | `RECEIVER_TO`
    `static java.lang.String` | `SERVER`
    `static java.lang.String` | `SERVER_CONNECTION_TIMEOUT`
    `static java.lang.String` | `SERVER_PORT`
    `static java.lang.String` | `SERVER_TIMEOUT`
    `static java.lang.String` | `SUBJECT`
    `static java.lang.String` | `SUPPRESS_SUBJECT`
    `static java.lang.String` | `USE_AUTH`
    `static java.lang.String` | `USE_EML`
    `static java.lang.String` | `USERNAME`

    - ### Fields inherited from interface org.apache.jmeter.testelement.TestElement

      `COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SmtpSampler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `applies(ConfigTestElement configElement)` Does configElement apply to Sampler
    `SampleResult` | `sample(Entry e)` Performs the sample, and returns the result

    - ### Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

      `addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.jmeter.testelement.TestElement

      `addTestElement, canRemove, clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse`

- - ### Field Detail

    - #### SERVER

          public static final java.lang.String SERVER

      See Also:
        Constant Field Values

    - #### SERVER_PORT

          public static final java.lang.String SERVER_PORT

      See Also:
        Constant Field Values

    - #### SERVER_TIMEOUT

          public static final java.lang.String SERVER_TIMEOUT

      See Also:
        Constant Field Values

    - #### SERVER_CONNECTION_TIMEOUT

          public static final java.lang.String SERVER_CONNECTION_TIMEOUT

      See Also:
        Constant Field Values

    - #### USE_AUTH

          public static final java.lang.String USE_AUTH

      See Also:
        Constant Field Values

    - #### USERNAME

          public static final java.lang.String USERNAME

      See Also:
        Constant Field Values

    - #### PASSWORD

          public static final java.lang.String PASSWORD

      See Also:
        Constant Field Values

    - #### MAIL_FROM

          public static final java.lang.String MAIL_FROM

      See Also:
        Constant Field Values

    - #### MAIL_REPLYTO

          public static final java.lang.String MAIL_REPLYTO

      See Also:
        Constant Field Values

    - #### RECEIVER_TO

          public static final java.lang.String RECEIVER_TO

      See Also:
        Constant Field Values

    - #### RECEIVER_CC

          public static final java.lang.String RECEIVER_CC

      See Also:
        Constant Field Values

    - #### RECEIVER_BCC

          public static final java.lang.String RECEIVER_BCC

      See Also:
        Constant Field Values

    - #### SUBJECT

          public static final java.lang.String SUBJECT

      See Also:
        Constant Field Values

    - #### SUPPRESS_SUBJECT

          public static final java.lang.String SUPPRESS_SUBJECT

      See Also:
        Constant Field Values

    - #### MESSAGE

          public static final java.lang.String MESSAGE

      See Also:
        Constant Field Values

    - #### PLAIN_BODY

          public static final java.lang.String PLAIN_BODY

      See Also:
        Constant Field Values

    - #### INCLUDE_TIMESTAMP

          public static final java.lang.String INCLUDE_TIMESTAMP

      See Also:
        Constant Field Values

    - #### ATTACH_FILE

          public static final java.lang.String ATTACH_FILE

      See Also:
        Constant Field Values

    - #### MESSAGE_SIZE_STATS

          public static final java.lang.String MESSAGE_SIZE_STATS

      See Also:
        Constant Field Values

    - #### HEADER_FIELDS

          public static final java.lang.String HEADER_FIELDS

      See Also:
        Constant Field Values

    - #### USE_EML

          public static final java.lang.String USE_EML

      See Also:
        Constant Field Values

    - #### EML_MESSAGE_TO_SEND

          public static final java.lang.String EML_MESSAGE_TO_SEND

      See Also:
        Constant Field Values

    - #### ENABLE_DEBUG

          public static final java.lang.String ENABLE_DEBUG

      See Also:
        Constant Field Values

    - #### FILENAME_SEPARATOR

          public static final java.lang.String FILENAME_SEPARATOR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SmtpSampler

          public SmtpSampler()

  - ### Method Detail

    - #### sample

          public SampleResult sample(Entry e)

      Performs the sample, and returns the result
      Parameters:
        `e` - Standard-method-header from JMeter
      Returns:
        Result of the sample
      See Also:
        `Sampler.sample(org.apache.jmeter.samplers.Entry)`

    - #### applies

          public boolean applies(ConfigTestElement configElement)

      Description copied from class: `AbstractSampler`
      Does configElement apply to Sampler
      Specified by:
        `applies` in interface `ConfigMergabilityIndicator`
      Overrides:
        `applies` in class `AbstractSampler`
      Parameters:
        `configElement` - `ConfigTestElement`
      Returns:
        boolean
      See Also:
        `AbstractSampler.applies(org.apache.jmeter.config.ConfigTestElement)`

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.