Validate SMTP
POST
/web/v1/notification/email/validate/smtpWEBValidates an SMTP email server configuration by attempting to connect and authenticate.
Authentication
Requires a valid JWT token and Turnstile verification. Gateway validation: enableJwtToken=true, enableTurnstile=true.
Request Parameters
Query Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
requestId | string | Yes | query | Unique request ID for idempotency/tracking |
Request Body
EmailValidationRequest:
| Name | Type | Required | In | Description |
|---|---|---|---|---|
channelHost | string | Yes | body | Notification channel host/access endpoint |
config | object | Yes | body | Email channel configuration to validate |
config.smtpHost | string | Yes | body | SMTP server hostname |
config.smtpPort | integer | Yes | body | SMTP server port (1-65535) |
config.senderEmail | string | Yes | body | Sender email address |
config.senderName | string | Yes | body | Sender display name |
config.username | string | Yes | body | SMTP authentication username |
config.password | string | Yes | body | SMTP authentication password |
config.useSsl | boolean | No | body | Use SSL (default: true) |
config.useStartTls | boolean | No | body | Use STARTTLS (default: false) |
config.connectionTimeout | integer | No | body | Connection timeout in ms (default: 10000) |
config.readTimeout | integer | No | body | Read timeout in ms (default: 30000) |
Success Response
Success200
{
"code": "2000",
"message": "SUCCESS",
"data": {
"valid": true,
"results": {
"SMTP": {
"success": true,
"serverHost": "smtp.example.com",
"serverPort": 587,
"connectionTimeMs": 245,
"errorCode": null,
"errorMessage": null
}
}
}
}Error Responses
| Code | Description |
|---|---|
4000 | Validation error (missing required config fields) |
4010 | Unauthorized (invalid or missing JWT token) |
4030 | Turnstile verification failed |
Notes
- This endpoint tests the SMTP connection only. Use the IMAP validation endpoint to test IMAP connectivity.
- The
requestIdquery parameter can be used for idempotency and request tracking. - A successful validation does not create or modify any channel.