Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_EditEmailCfg

### Interface Definition

C++C#

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    BOOL NET_SDK_EditEmailCfg(
        LONG lUserID,
        const char* password,
        const char* address,
        const char* senderName,
        const char* userName,
        BOOL anonymousSwitch,
        int attachImg,
        int imageNumber,
        BOOL snapImgSwitch,
        BOOL orgImgSwitch,
        const char* server,
        int port,
        NET_SDK_EMAIL_SSL_MODE ssl);

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    public static extern Boolean NET_SDK_EditEmailCfg(
        Int32 lUserID,
        string password,
        string address,
        string senderName,
        string userName,
        Boolean anonymousSwitch,
        Int32 attachImg,
        Int32 imageNumber,
        Boolean snapImgSwitch,
        Boolean orgImgSwitch,
        string server,
        Int32 port,
        NET_SDK_EMAIL_SSL_MODE ssl);

### Function Description

Email configuration interface, set the email sending parameters of the device.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, return value of `NET_SDK_Login`.
passwordin | char* | Email password (clear text, internal MD5 encryption).
addressin | char* | Email address.
senderNamein | char* | Sender name.
userNamein | char* | Email username.
anonymousSwitchin | BOOL | Anonymous switch (TRUE: on, FALSE: off).
attachImgin | int | Whether to attach pictures (0: Do not attach, 1: Attach).
imageNumberin | int | Number of images (range 4-10, beyond default 8).
snapImgSwitchin | BOOL | Snap picture switch (TRUE: on, FALSE: off).
orgImgSwitchin | BOOL | Original picture switch (TRUE: on, FALSE: off).
serverin | char* | SMTP server address.
portin | int | SMTP server port.
sslin | `NET_SDK_EMAIL_SSL_MODE` | SSL encryption mode (0:NO, 1:TLS, 2:SSL).

### Return Value

- Type：BOOL

- Remark：Returns TRUE if successful, FALSE if failed.

### Remarks

None

Error Code