Test

Function

This API is used to test parameter for Network > Email.

Request Message

Parameter Description

Table 1
ParameterRangeTypeDescription
email_enableboolEnable email functionality
encryption"Disable",
"SSL",
"TLS",
"AUTO"
stringEncryption Type
smtp_port[1~65535]intSMTP port
smtp_serverMax lenth:127 bytestringSMTP server
username[1~65535]intEmail user name
password[1~65535]intEmail password
password_empty[1~65535]intIs the password empty
sender[1~65535]intsender address
recvemailJSON,see Table 2 for more information
interval_time1.3.5.10intSending interval time. Unit: minutes
test_id1~65535inttest id
email_test_flag"Start"、"Stop"、"Query”stringEmail test instructions (start testing, stop testing, obtain test results)
base_enc_passwordJson Objectencrypted password,see base_secondary_authentication for more information
Table 2
ParameterRangeTypeDescription
recvemail_1Email addresses of 3 receivers
recvemail_2
recvemail_3

Sample:

POST /API/NetworkConfig/Email/Test HTTP/1.1
{
    "data": {
        "email_enable": false,
        "encryption": "AUTO",
        "smtp_port": 25,
        "smtp_server": "smtp163.com",
        "username": "123456@qq.com ",
        "password": "321",
        "sender": "123456@qq.com",
        "recvemail_1": "654321@qq.com ",
        "recvemail_2": "",
        "recvemail_3": "",
        "interval_time": 3,
        "test_id": 3,
        "email_test_Flag":"start"
    }
}

Response Message

Parameter Description

Table 3
ParameterRangeTypeDescription
test_state"Testing"(Testing)
"Ok"(Tested)
stringEnable email testing status (if the test fails, an error will be directly returned)

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result":"success",
    "data":{}
}

Error Code

See Response Messages Body and Common error_code for more information.