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 Name | Type | Required | Length/Range | Default | Description |
---|---|---|---|---|---|
target | enum | Yes | - | SMTP | Task Type Identifier Fixed value: SMTP |
name | string | Yes | ≤400 chars | - | Task Unique Identifier Example: Order Notification Email |
description | string | No | ≤800 chars | - | Task Description Detailed explanation of email purpose |
enabled | boolean | Yes | - | true | Enable Statustrue : Execute taskfalse : Skip task |
beforeName | string | No | ≤400 chars | - | Predecessor Task Controls execution order Example: Data Preparation Task |
server | object | Yes | - | - | SMTP Server Configuration Contains connection and authentication information |
mail | object | Yes | - | - | 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:
- 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 Name | Type | Required | Range/Length | Default | Description |
---|---|---|---|---|---|
server | string | Yes | - | - | Mail Server Address Supports domain/IP Example: mail.example.com |
port | integer | Yes | 1-65535 | - | Service Port Standard ports: SMTP:25, POP3:110, IMAP:143 Secure ports: SMTPS:465, POP3S:995, IMAPS:993 |
security | object | Yes | - | - | Security Configuration Object See security configuration details |
useAuth | boolean | Yes | - | true | Enable Authenticationtrue : Requires username/passwordfalse : Anonymous access |
username | string | Conditional | ≤400 chars | - | Authentication Account Required when useAuth=true Full email format: user@domain.com |
password | string | Conditional | ≤4096 chars | - | Authentication Credential Required when useAuth=true Supports encrypted storage |
connectTimeout | string | No | 1s-24h | 6s | Connection Timeout Format: number+unit (e.g., 10s )Maximum wait time for TCP connection establishment |
readTimeout | string | No | 1s-24h | 60s | Read Timeout Format: number+unit (e.g., 30s )Maximum wait time for single data read operation |
SMTP Server Structure Configuration Example:
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)
Parameter | Type | Required | Length Limit | Default | Description |
---|---|---|---|---|---|
use | enum | Yes | - | NONE | Encryption TypeNONE : PlaintextUSE_SSL : SSL encryptionUSE_STARTTLS : STARTTLS upgrade |
trustAllCerts | boolean | No | - | false | Trust All Certificatestrue : Skip certificate validation (dangerous)false : Verify certificate validity |
enforceStartTLS | boolean | No | - | false | Enforce STARTTLStrue : Reject unsupported serversfalse : Fallback to plaintext |
useLocalTrustStore | boolean | No | - | false | Use Local Trust Storetrue : Use custom certificatesfalse : Use system defaults |
trustStorePath | string | Conditional | ≤4096 chars | - | Trust Store Path Local certificate file path Example: /etc/ssl/custom.pem |
trustStoreBase64Content | string | Conditional | ≤40KB | - | Trust Store Content Base64-encoded certificate content |
tlsProtocols | string | No | ≤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:
security:
use: USE_START_TLS
trustAllCerts: true
enforceStartTLS: false
useLocalTrustStore: false
trustStorePath: ""
trustStoreBase64Content: VGhpcyBpcyBhIGNlcnRpZmljYXRlIGNvbnRlbnQ=
tlsProtocols: TLSv1.2
SMTP Email Sending Configuration (mail)
Field Name | Type | Required | Length Limit | Description |
---|---|---|---|---|
mailFrom | string | No | ≤4096 chars | Sender Address Format: "Display Name <email@domain.com>" Uses server auth account if not set |
replyTo | string | No | ≤4096 chars | Reply-To Address Multiple addresses separated by semicolons Example: "support@company.com;feedback@company.com" |
receiverTo | string | Yes | ≤4096 chars | Primary Recipients Multiple addresses separated by semicolons Example: "user1@example.com;user2@example.com" |
receiverCC | string | No | ≤4096 chars | CC Recipients Multiple addresses separated by semicolons Example: "manager@example.com;team@example.com" |
receiverBCC | string | No | ≤4096 chars | BCC Recipients Multiple addresses separated by semicolons Example: "archive@example.com;audit@example.com" |
content | object | Yes | - | Email Content Configuration Includes subject, body, attachments, etc. |
Parameter Grouping and Relationship Diagram:
SMTP Email Sending Configuration Example:
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 Name | Type | Required | Length/Quantity Limit | Description |
---|---|---|---|---|
subject | string | No | ≤4096 chars | Email Subject Clear description of email content Example: Order Confirmation - #{orderId} |
suppressSubject | boolean | No | - | Disable Subjecttrue : Send subjectless emailfalse : Include subject (default) |
message | string | No | ≤2MB | Email Body Supports plain text/HTML format Use plainBody to specify format |
plainBody | boolean | No | - | Plain Text Formattrue : Plain textfalse : HTML format (default) |
includeTimestamp | boolean | No | - | Include Timestamptrue : Add send time to bodyfalse : Don't add (default) |
localAttachFiles | array | No | 1-100 items | Local Attachment Paths Array of file paths Example: ["/reports/invoice.pdf", "/data/export.csv"] |
localAttachBase64Contents | map | No | 1-100 items | Base64 Attachment Content Key: Filename Value: Base64-encoded content Example: {"report.xlsx": "base64string..."} |
messageSizeStatistics | object | No | - | Email Size Statistics Contains email size information Example: {enabled: true, maxSize: "10MB"} |
headerFields | map | No | 1-200 items | Custom Email Headers Key-value pairs Example: X-Priority: "1" X-Mailer: "AngusTester" |
sendEmlMessage | boolean | No | - | Use EML Formattrue : Send EML format emailfalse : Standard format (default) |
localEmlMessageFile | string | No | ≤4096 chars | EML File Path Used when sendEmlMessage=true Mutually exclusive with localEmlMessageBase64Content |
localEmlMessageBase64Content | string | No | ≤2MB | Base64-encoded EML Content Used when sendEmlMessage=true Mutually exclusive with localEmlMessageFile |
enableDebugLogging | boolean | No | - | Enable Debug Loggingtrue : Record detailed sending logsfalse : 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:
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
- 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
- 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
- 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