Skip to content

SMTP Testing Task

The SMTP Testing Task defines an SMTP protocol testing task for functional, performance, stability, and custom testing of SMTP capabilities.

Main Parameter List

Field NameTypeRequiredLength/RangeDefaultDescription
targetenumYes-SMTPTask Type Identifier
Fixed value: SMTP
namestringYes≤400 chars-Task Unique Identifier
Example: Order Notification Email
descriptionstringNo≤800 chars-Task Description
Detailed explanation of email purpose
enabledbooleanYes-trueEnable Status
true: Execute task
false: Skip task
beforeNamestringNo≤400 chars-Predecessor Task
Controls execution order
Example: Data Preparation Task
serverobjectYes--SMTP Server Configuration
Contains connection and authentication information
mailobjectYes--Email Content Configuration
Includes sender, recipients, subject, body, etc.

Note

Multiple SMTP interfaces can be orchestrated simultaneously, but only one SMTP can be enabled for testing at a time.

Complete Mail Structure Configuration Example:

yaml
- target: SMTP
  name: Send mail messages (SMTP)
  description: Using SMTP protocol to send emails
  enabled: true
  server:
    # Mail server configuration ...
  mail:
    # Mail configuration

SMTP Server Configuration (server)

Field NameTypeRequiredRange/LengthDefaultDescription
serverstringYes--Mail Server Address
Supports domain/IP
Example: mail.example.com
portintegerYes1-65535-Service Port
Standard ports:
SMTP:25, POP3:110, IMAP:143
Secure ports:
SMTPS:465, POP3S:995, IMAPS:993
securityobjectYes--Security Configuration Object
See security configuration details
useAuthbooleanYes-trueEnable Authentication
true: Requires username/password
false: Anonymous access
usernamestringConditional≤400 chars-Authentication Account
Required when useAuth=true
Full email format: user@domain.com
passwordstringConditional≤4096 chars-Authentication Credential
Required when useAuth=true
Supports encrypted storage
connectTimeoutstringNo1s-24h6sConnection Timeout
Format: number+unit (e.g., 10s)
Maximum wait time for TCP connection establishment
readTimeoutstringNo1s-24h60sRead Timeout
Format: number+unit (e.g., 30s)
Maximum wait time for single data read operation

SMTP Server Structure Configuration Example:

yaml
server:
  server: 192.168.0.211
  port: 993
  security:
    # Security configuration ...
  useAuth: true
  username: test001@xcan.cloud
  password: test001@xcan
  connectTimeout: 6s
  readTimeout: 60s

SMTP Server Security Configuration (security)

ParameterTypeRequiredLength LimitDefaultDescription
useenumYes-NONEEncryption Type
NONE: Plaintext
USE_SSL: SSL encryption
USE_STARTTLS: STARTTLS upgrade
trustAllCertsbooleanNo-falseTrust All Certificates
true: Skip certificate validation (dangerous)
false: Verify certificate validity
enforceStartTLSbooleanNo-falseEnforce STARTTLS
true: Reject unsupported servers
false: Fallback to plaintext
useLocalTrustStorebooleanNo-falseUse Local Trust Store
true: Use custom certificates
false: Use system defaults
trustStorePathstringConditional≤4096 chars-Trust Store Path
Local certificate file path
Example: /etc/ssl/custom.pem
trustStoreBase64ContentstringConditional≤40KB-Trust Store Content
Base64-encoded certificate content
tlsProtocolsstringNo≤80 chars-Enforce Protocol Version
Example: TLSv1.2, TLSv1.3

Note

When using trustStorePath, ensure the file has been uploaded to the corresponding execution node path.

SMTP Server Security Configuration Example:

yaml
security:
  use: USE_START_TLS
  trustAllCerts: true
  enforceStartTLS: false
  useLocalTrustStore: false
  trustStorePath: ""
  trustStoreBase64Content: VGhpcyBpcyBhIGNlcnRpZmljYXRlIGNvbnRlbnQ=
  tlsProtocols: TLSv1.2

SMTP Email Sending Configuration (mail)

Field NameTypeRequiredLength LimitDescription
mailFromstringNo≤4096 charsSender Address
Format: "Display Name <email@domain.com>"
Uses server auth account if not set
replyTostringNo≤4096 charsReply-To Address
Multiple addresses separated by semicolons
Example: "support@company.com;feedback@company.com"
receiverTostringYes≤4096 charsPrimary Recipients
Multiple addresses separated by semicolons
Example: "user1@example.com;user2@example.com"
receiverCCstringNo≤4096 charsCC Recipients
Multiple addresses separated by semicolons
Example: "manager@example.com;team@example.com"
receiverBCCstringNo≤4096 charsBCC Recipients
Multiple addresses separated by semicolons
Example: "archive@example.com;audit@example.com"
contentobjectYes-Email Content Configuration
Includes subject, body, attachments, etc.

Parameter Grouping and Relationship Diagram:

SMTP Email Sending Configuration Example:

yaml
mail:
  mailFrom: test002@xcan.cloud
  replyTo: reply@xcan.cloud
  receiverTo: test001@xcan.cloud
  receiverCC: ccrecipient@xcan.cloud
  receiverBCC: bccrecipient@xcan.cloud
  content:
    subject: The subject of the email
    suppressSubject: false
    message: The main content or body of the email.
    plainBody: true
    includeTimestamp: true
    localAttachFiles:
      - /data/attach1.txt
      - /data/attach2.txt
    localAttachBase64Contents:
      attach1.txt: VGhpcyBpcyBhIGF0dGFjaG1lbnQxIGNvbnRlbnQ=
      attach2.txt: VGhpcyBpcyBhIGF0dGFjaG1lbnQyIGNvbnRlbnQ=
    messageSizeStatistics: true
    headerFields:
      X-MyHeader1: CustomValue1
      X-MyHeader2: CustomValue2
    sendEmlMessage: false
    localEmlMessageFile: /data/test.eml
    localEmlMessageBase64Content: VGhpcyBpcyBhIGVtYWlsIGNvbnRlbnQ=
    enableDebugLogging: true

SMTP Email Content Configuration (content)

Field NameTypeRequiredLength/Quantity LimitDescription
subjectstringNo≤4096 charsEmail Subject
Clear description of email content
Example: Order Confirmation - #{orderId}
suppressSubjectbooleanNo-Disable Subject
true: Send subjectless email
false: Include subject (default)
messagestringNo≤2MBEmail Body
Supports plain text/HTML format
Use plainBody to specify format
plainBodybooleanNo-Plain Text Format
true: Plain text
false: HTML format (default)
includeTimestampbooleanNo-Include Timestamp
true: Add send time to body
false: Don't add (default)
localAttachFilesarrayNo1-100 itemsLocal Attachment Paths
Array of file paths
Example: ["/reports/invoice.pdf", "/data/export.csv"]
localAttachBase64ContentsmapNo1-100 itemsBase64 Attachment Content
Key: Filename
Value: Base64-encoded content
Example: {"report.xlsx": "base64string..."}
messageSizeStatisticsobjectNo-Email Size Statistics
Contains email size information
Example: {enabled: true, maxSize: "10MB"}
headerFieldsmapNo1-200 itemsCustom Email Headers
Key-value pairs
Example: X-Priority: "1"
X-Mailer: "AngusTester"
sendEmlMessagebooleanNo-Use EML Format
true: Send EML format email
false: Standard format (default)
localEmlMessageFilestringNo≤4096 charsEML File Path
Used when sendEmlMessage=true
Mutually exclusive with localEmlMessageBase64Content
localEmlMessageBase64ContentstringNo≤2MBBase64-encoded EML Content
Used when sendEmlMessage=true
Mutually exclusive with localEmlMessageFile
enableDebugLoggingbooleanNo-Enable Debug Logging
true: Record detailed sending logs
false: Error logs only (default)

Note

When using localAttachFiles and localEmlMessageFile, ensure the files have been uploaded to the corresponding execution node path.

SMTP Email Content Configuration Example:

yaml
content:
  subject: The subject of the email
  suppressSubject: false
  message: The main content or body of the email.
  plainBody: true
  includeTimestamp: true
  localAttachFiles:
    - /data/attach1.txt
    - /data/attach2.txt
  localAttachBase64Contents:
    attach1.txt: VGhpcyBpcyBhIGF0dGFjaG1lbnQxIGNvbnRlbnQ=
    attach2.txt: VGhpcyBpcyBhIGF0dGFjaG1lbnQyIGNvbnRlbnQ=
  messageSizeStatistics: true
  headerFields:
    X-MyHeader1: CustomValue1
    X-MyHeader2: CustomValue2
  sendEmlMessage: false
  localEmlMessageFile: /data/test.eml
  localEmlMessageBase64Content: VGhpcyBpcyBhIGVtYWlsIGNvbnRlbnQ=
  enableDebugLogging: true

Script Examples (target)

Complete Parameter Configuration Example

yaml
- target: SMTP
  name: Send mail messages (SMTP)
  description: Using SMTP protocol to send emails
  enabled: true
  server:
    server: 192.168.0.211
    port: 465
    security:
      use: USE_START_TLS
      trustAllCerts: true
      enforceStartTLS: false
      useLocalTrustStore: false
      trustStoreBase64Content: VGhpcyBpcyBhIGNlcnRpZmljYXRlIGNvbnRlbnQ=
      tlsProtocols: TLSv1.2
    useAuth: true
    username: test001@xcan.cloud
    password: test001@xcan
    readTimeout: 60s
    connectTimeout: 6s
  mail:
    mailFrom: test002@xcan.cloud
    replyTo: reply@xcan.cloud
    receiverTo: test001@xcan.cloud
    receiverCC: ccrecipient@xcan.cloud
    receiverBCC: bccrecipient@xcan.cloud
    content:
      subject: The subject of the email
      suppressSubject: false
      message: The main content or body of the email.
      plainBody: true
      includeTimestamp: true
      localAttachFiles:
        - /data/attach1.txt
        - /data/attach2.txt
      localAttachBase64Contents:
        attach1.txt: VGhpcyBpcyBhIGF0dGFjaG1lbnQxIGNvbnRlbnQ=
        attach2.txt: VGhpcyBpcyBhIGF0dGFjaG1lbnQyIGNvbnRlbnQ=
      messageSizeStatistics: true
      headerFields:
        X-MyHeader1: CustomValue1
        X-MyHeader2: CustomValue2
      sendEmlMessage: false
      localEmlMessageFile: /data/test.eml
      localEmlMessageBase64Content: VGhpcyBpcyBhIGVtYWlsIGNvbnRlbnQ=
      enableDebugLogging: true

Send Plain Text Email

yaml
- target: SMTP
  name: Send mail plain message (SMTP)
  description: Using SMTP protocol to send plain message email
  enabled: true
  server:
    server: 192.168.0.211
    port: 465
    security:
      use: USE_SSL
      trustAllCerts: true
      enforceStartTLS: false
      useLocalTrustStore: false
    useAuth: true
    username: test001@xcan.cloud
    password: test001@xcan
    readTimeout: 60s
    connectTimeout: 6s
  mail:
    mailFrom: test002@xcan.cloud
    receiverTo: test001@xcan.cloud
    content:
      subject: The subject of the email
      suppressSubject: false
      message: The main content or body of the email.
      plainBody: true
      enableDebugLogging: false

Send Text Email with Attachments

yaml
- target: SMTP
  name: Send mail local attachments message (SMTP)
  description: Using SMTP protocol to send local attachments message email
  enabled: true
  server:
    server: 192.168.0.211
    port: 465
    security:
      use: USE_SSL
      trustAllCerts: true
      enforceStartTLS: false
      useLocalTrustStore: false
    useAuth: true
    username: test001@xcan.cloud
    password: test001@xcan
    readTimeout: 60s
    connectTimeout: 6s
  mail:
    mailFrom: test002@xcan.cloud
    receiverTo: test001@xcan.cloud
    content:
      subject: The subject of the email
      suppressSubject: false
      message: The main content or body of the email.
      plainBody

Released under the GPL-3.0 License.