Range

Function

This API is used to get the parameter range of Network > Email.

Request Message

None.

Sample:

POST /API/NetworkConfig/Email/Range HTTP/1.1
{
    "version": "1.0",
    "data": {}
}

Response 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 length: 127bytestringSMTP server.
usernameMax length: 127bytestringEmail username.
passwordMax length: 127bytestringEmail password.(Only indicate the range in Range, deprecated in Get, Set and Test, pass empty)
senderMax length: 127bytestringSender address.
recvemailrecvemail JSON,Table 2
password_emptyboolIs the password empty.
interval_time1,3,5,10intSending time interval, Unit:minute
base_enc_passwordJson ObjectSee base_enc_password.
report_buttonObjectSee Table 3.
Table 2

recvemail JSON

ParameterRangeTypeDescription
recvemail_1Max length: 127 bytestringSender 1 Address
recvemail_2Max length: 127 bytestringSender 2 Address
recvemail_3Max length: 127 bytestringSender 3 Address
Table 3
ParameterRangeTypeDescription
report_button_1"send_device_report"stringShow Send Report button

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "email_enable": {"type": "bool"},
        "encryption": {
            "type": "string",
            "items": [
                "Disable",
                "SSL",
                "TLS",
                "Auto"
            ]
        },
        "smtp_port": {
            "type": "int32",
            "mode": "r",
            "min": 1,
            "max": 65535,
            "default_value": 25
        },
        "smtp_server": {
            "description": "Each range {min_len,max_len} corresponds to one email_enable state [false,true].",
            "type": "string",
            "mode": "rw",
            "ranges": [
                {
                    "min_len": 0,
                    "max_len": 127
                },
                {
                    "min_len": 1,
                    "max_len": 127
                }
            ]
        },
        "username": {
            "description": "Each range {min_len,max_len} corresponds to one email_enable state [false,true].",
            "type": "string",
            "mode": "rw",
            "ranges": [
                {
                    "min_len": 0,
                    "max_len": 127
                },
                {
                    "min_len": 1,
                    "max_len": 127
                }
            ]
        },
        "password": {
            "type": "string",
            "min_len": 0,
            "max_len": 127
        },
        "password_empty": {"type": "bool"},
        "sender": {
            "description": "Each range {min_len,max_len} corresponds to one email_enable state [false,true].",
            "type": "string",
            "mode": "rw",
            "ranges": [
                {
                    "min_len": 0,
                    "max_len": 127
                },
                {
                    "min_len": 0,
                    "max_len": 127
                }
            ]
        },
        "recvemail": {
            "description": "When email_enable state is [true], at least one recvemail must be configured.",
            "type": "object",
            "items": {
                "recvemail_1": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 127
                },
                "recvemail_2": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 127
                },
                "recvemail_3": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 127
                }
            }
        },
        "interval_time": {
            "type": "int32",
            "unit": "minute",
            "items": [
                1,
                3,
                5,
                10
            ]
        },
        "report_button": {
            "type": "object",
            "items": {"report_button_1": {
                "type": "string",
                "min_len": 0,
                "max_len": 127
            }}
        },
        "test_version": "2.0"
    }
}

Error Code

See Response Messages Body and Common error_code for more information.