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.

# DD_SMTP_CONFIG

### Structure Definition

C++C#

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    typedef struct _dd_smtp_config_
    {
        unsigned int iSize;
        unsigned short port;
        unsigned short enableSSL;
        char server[DD_MAX_URL_BUF_LEN];
        char sendAddress[DD_MAX_URL_BUF_LEN];
        char password[DD_MAX_PASSWORD_BUF_LEN];
        unsigned int enableRecvAddrNum;
        char receiveAddress[DD_MAX_EMAIL_RECEIVE_ADDR_NUM][DD_MAX_URL_BUF_LEN];
    } DD_SMTP_CONFIG;

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct DD_SMTP_CONFIG
    {
        public UInt32 iSize;
        public UInt16 port;
        public UInt16 enableSSL;
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U1, SizeConst = 260)]
        public byte[] server;
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U1, SizeConst = 260)]
        public byte[] sendAddress;
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U1, SizeConst = 132)]
        public byte[] password;
        public UInt32 enableRecvAddrNum;
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U1, SizeConst = 3)]
        public byte[] receiveAddress;
    }

### Function Description

SMTP configuration structure.

### Member Description

Member | Type | Remark
--- | --- | ---
iSize | unsigned int | The length of this structure.
port | unsigned short | Mail service port.
enableSSL | unsigned short | Whether to enable SSL inspection.
server | char[DD_MAX_URL_BUF_LEN] | Sending server address.
sendAddress | char[DD_MAX_URL_BUF_LEN] | Sending email address.
password | char[DD_MAX_PASSWORD_BUF_LEN] | Account password.
enableRecvAddrNum | unsigned int | The number of available receive addresses (read-only).
receiveAddress | char[DD_MAX_EMAIL_RECEIVE_ADDR_NUM] | A list of receiving addresses.

Error Code