Appearance
Test email config
About 248 wordsLess than 1 minute
apiEmail
2025-03-13
MethodPOST
Request URL
/plugin/datafor-modeler/api/email/sendEmailTest
Authorization
Use of this API requires authentication. For details about the authentication method, see
Authorization.
Preconditions
- The current user's user type must be Administrator.
Request Example
{
"smtpHost": "smtp.a.com",
"smtpPort": "465",
"userId": "a@a.com",
"password": "",
"smtpProtocol": "smtp",
"defaultFrom": "a@a.com",
"fromName": "a",
"useStartTls": "false",
"useSsl": "true",
"authenticate": true
}
Request Schema
Name | Location | Type | Required | Description |
---|---|---|---|---|
smtpHost | body | string | Yes | SMTP server hostname |
smtpPort | body | string | Yes | SMTP port number |
userId | body | string | Yes | SMTP authentication user ID |
password | body | string | Yes | SMTP password |
smtpProtocol | body | string | Yes | SMTP protocol (smtp or smtps ) |
defaultFrom | body | string | Yes | Default sender email |
fromName | body | string | Yes | Sender's display name |
useStartTls | body | boolean | Yes | Use STARTTLS (true /false ) |
useSsl | body | boolean | Yes | Use SSL (true /false ) |
authenticate | body | boolean | Yes | Enable authentication (true /false ) |
Response Examples
✅ Success Response
{
"code": "200",
"success": true
}
❌ Failure Response
{
"msg": "Empty address",
"code": "500",
"success": false,
"type": "1"
}
HTTP Responses
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
200 | OK | none | Inline |
Response Data Schema (HTTP 200)
Name | Type | Required | Description |
---|---|---|---|
msg | string | No | Response message (e.g., error details) |
code | string | No | Response status code (200 for success, 500 for failure) |
success | boolean | Yes | true if request was successful, false otherwise |
type | string | No | Error type (if applicable) |