POST Validate SMTP endpoint.
Endpoint
POST
/web/v1/system/notifications/email/validate/smtp WEBAuthentication
- Chain: WEB
- JWT Token: true
- API Key: false
- Permissions: ["platform:notification:write"]
Rate Limit
Standard rate limit applies.
Headers
Frontend Headers
| Header | Required | Description |
|---|---|---|
| X-LOCALE | Yes | 用户的 locale |
| Accept-Language | No | 语言偏好 |
Cloudflare Headers
| Header | Required | Description |
|---|---|---|
| CF-Connecting-IP | Yes | Client IP from Cloudflare |
| CF-IPCountry | Yes | Client country code |
| CF-Ray | Yes | Cloudflare Ray ID |
| CF-Visitor | Yes | Visitor scheme |
| CF-Worker | No | Cloudflare Worker indicator |
| CF-TCP-Port | No | Client TCP port |
| CF-Edge-Keep-Alive | No | Edge keep-alive status |
| CF-Cache-Status | No | Cache status |
| CDN-Loop | No | CDN loop detection |
| X-Real-IP | Yes | Real client IP |
Nginx Headers
| Header | Required | Description |
|---|---|---|
| X-PORTAL-ACCESS-CODE | Yes | Portal access code |
| X-Real-IP | Yes | 客户端真实 IP |
| X-Forwarded-For | Yes | 代理链 |
| X-Forwarded-Proto | Yes | 协议 |
Request Parameters
Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| config | EmailChannelConfig | Yes | 邮件渠道配置 |
| config.smtpHost | String | Yes | SMTP 服务器主机名 |
| config.smtpPort | Integer | Yes | SMTP 服务器端口 (1-65535) |
| config.senderEmail | String | Yes | 发件人邮箱地址 |
| config.senderName | String | Yes | 发件人显示名称 |
| config.username | String | Yes | SMTP 认证用户名 |
| config.password | String | Yes | SMTP 认证密码 |
| config.useSsl | Boolean | No | 是否使用 SSL 加密 (默认 true) |
| config.useStartTls | Boolean | No | 是否使用 STARTTLS (默认 false) |
| config.connectionTimeout | Integer | No | 连接超时时间(毫秒, 默认 10000) |
| config.readTimeout | Integer | No | 读取超时时间(毫秒, 默认 30000) |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| data.valid | boolean | 配置是否有效 |
| data.results | Map<ProtocolType, ProtocolValidationResult> | 各协议的验证结果映射 |