Mail Testing Task
The
Mail Testing Task
defines a Mail (POP3/IMAP) protocol testing task for mail functionality, performance, stability, and custom testing.
Main Parameter List
Parameter | Type | Required | Length Limit | Description |
---|---|---|---|---|
target | enum | Yes | - | Task Type Fixed value: MAIL |
name | string | Yes | ≤400 chars | Task Name Unique identifier for the mail task |
description | string | No | ≤800 chars | Task Description Detailed explanation of task purpose |
enabled | boolean | Yes | - | Enable Statustrue : Enabled (default)false : Disabled |
beforeName | string | No | ≤400 chars | Predecessor Task Controls task execution order |
protocol | enum | Yes | - | Mail ProtocolPOP3 : Post Office ProtocolIMAP : Internet Message Access Protocol |
server | object | Yes | - | Server Configuration See server configuration details below |
mail | object | Yes | - | Mail Configuration See mail configuration details below |
Note
Multiple Mail interfaces can be orchestrated simultaneously, but only one Mail task can be enabled for testing at a time.
Complete Mail configuration example:
yaml
- target: MAIL
name: Get mail messages (IMAP)
description: Using IMAP protocol to obtain emails
enabled: true
protocol: IMAP
server:
# Mail server configuration ...
mail:
# Mail configuration
Mail 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 |
readTimeout | string | No | 1s-24h | 60s | Read Timeout Format: number+unit (e.g., 30s )Maximum wait time for single data read |
Mail server configuration example:
yaml
server:
server: 192.168.0.211
port: 993
security:
# Security configuration ...
useAuth: true
username: test001@xcan.cloud
password: test001@xcan
readTimeout: 60s
connectTimeout: 6s
Mail 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 verification (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.
Mail server security configuration example:
yaml
security:
use: USE_START_TLS
trustAllCerts: true
enforceStartTLS: false
useLocalTrustStore: false
trustStorePath: ""
trustStoreBase64Content: VGhpcyBpcyBhIGNlcnRpZmljYXRlIGNvbnRlbnQ=
tlsProtocols: TLSv1.2
Mail Configuration (mail)
Field Name | Type | Required | Length/Quantity Limit | Description |
---|---|---|---|---|
folder | string | No | ≤100 chars | Target Mail Folder Default: INBOX Supports standard folders (SENT/DRAFTS/TRASH) or custom paths |
deleteMessage | boolean | No | - | Mail Deletion Policytrue : Automatically delete after processingfalse : Keep mail (default) |
storeMimeMessage | boolean | No | - | Original Mail Storagetrue : Save complete MIME-formatted mail to task directoryfalse : Do not store (default) |
numMessages | integer | No | ≥0 | Mail Processing Quantity Default: 1 0 : Process all mailN : Limit to N messages |
Mail configuration example:
yaml
mail:
folder: INBOX
deleteMessage: false
storeMimeMessage: true
numMessages: 1
Script Examples (target)
Complete Parameter Configuration Example
yaml
- target: MAIL
name: Get mail messages (IMAP)
description: Using IMAP protocol to obtain emails
enabled: true
protocol: IMAP
server:
server: 192.168.0.211
port: 993
security:
use: USE_START_TLS
trustAllCerts: true
enforceStartTLS: false
useLocalTrustStore: false
trustStorePath: ""
trustStoreBase64Content: VGhpcyBpcyBhIGNlcnRpZmljYXRlIGNvbnRlbnQ=
tlsProtocols: TLSv1.2
useAuth: true
username: test001@xcan.cloud
password: test001@xcan
readTimeout: 60s
connectTimeout: 6s
mail:
folder: INBOX
deleteMessage: false
storeMimeMessage: false
numMessages: 1
Retrieve Emails Using IMAP Protocol
yaml
- target: MAIL
name: Get mail messages (IMAP)
description: Using IMAP protocol to obtain emails
enabled: true
protocol: POP3
server:
server: 192.168.0.211
port: 995
security:
use: USE_START_TLS
trustAllCerts: true
useAuth: true
username: test001@xcan.cloud
password: test001@xcan
readTimeout: 60s
connectTimeout: 6s
mail:
folder: INBOX
deleteMessage: false
storeMimeMessage: false
numMessages: 1
Retrieve Emails Using POP3 Protocol
yaml
- target: MAIL
name: Get mail messages (POP3)
description: Using POP3 protocol to obtain emails
enabled: true
protocol: POP3
server:
server: 192.168.0.211
port: 995
security:
use: USE_START_TLS
trustAllCerts: true
useAuth: true
username: test001@xcan.cloud
password: test001@xcan
readTimeout: 60s
connectTimeout: 6s
mail:
folder: INBOX
deleteMessage: false
storeMimeMessage: false
numMessages: 1