提供邮件服务器的创建、编辑、删除、根据ID获取详情以及获取邮件服务器列表功能,同时提供邮件模板的创建、编辑、删除、根据ID获取详情以及获取邮件模板列表功能。
功能描述:获取邮件服务器列表。
GET  /api/v1/mail/server/query/page
Body:
| Name | Type | Description | Required | 
|---|---|---|---|
| currentPage | int | 当前页码 | Yes | 
| pageSize | int | 每页的数据数量 | Yes | 
| filter | struct | 查询参数 | No | 
filter的子对象结构体:
| Name | Type | Description | Required | 
|---|---|---|---|
| name | string | 查询的名字 | Yes | 
Body example:
{
    "currentPage": 1,
    "pageSize": 5,
    "filter": {
        "name": "string"
    }
}
cURL example:
   curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/server/query/page?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}' \
 --header 'Content-Type: application/json' \
 --data-raw '{
     "currentPage": 1,
     "pageSize": 5,
     "filter": {
         "name": "string"
     }
 }'
Response data:
| Name | Type | Description | 
|---|---|---|
| totalCount | int | 总数量 | 
| pageSize | int | 分页大小 | 
| currentPage | int | 页码 | 
| totalPage | int | 总页数 | 
| content | struct[] | 内容 | 
Response data content的子对象结构体:
| Name | Type | Description | 
|---|---|---|
| id | string | 邮件服务器的ID | 
| name | string | 邮件服务器名称 | 
| account | string | 邮箱服务的账号 | 
| authCode | string | 授权码 | 
| serverHost | string | 服务的地址 | 
| serverPort | string | 服务的端口号 | 
| userId | string | 用户ID | 
| userName | string | 用户名称 | 
| type | int | 1云端 | 
Response example:
{
    "data": {
        "currentPage": 1,
        "pageSize": 5,
        "totalCount": 2,
        "totalPage": 1,
        "content": [
            {
                "id": "8ae490a470395eae01703c5aba040001",
                "name": "ttttt",
                "account": "112****798@qq.com",
                "authCode": "1111",
                "serverHost": "127.0.0.2",
                "serverPort": "555",
                "type": 1,
                "userId": "38869",
                "userName": "zhongsheng"
            },
            {
                "id": "8ae490a470395eae01703c5b0b8d0002",
                "name": "ttttt2",
                "account": "112****798@qq.com",
                "authCode": "1111",
                "serverHost": "127.0.0.2",
                "serverPort": "555",
                "type": 1,
                "userId": "38869",
                "userName": "zhongsheng"
            }
        ]
    },
    "success": true,
    "code": 0,
    "msg": null
}
功能描述:查询邮箱服务器详情。
GET  /api/v1/mail/server/id/{id}
Path:
| Name | Type | Description | Required | 
|---|---|---|---|
| id | string | 邮件服务器的ID | Yes | 
Query:
| Name | Description | Required | Type | marks | 
|---|---|---|---|---|
| accessKeyId | 用户访问服务所用的密钥ID | Yes | string | 系统生成,在生成用户时获取 | 
| signature | 签名结果串 | Yes | string | 不校验,备用字段 | 
| signatureNonce | 签名随机数 | Yes | int | 1小时内,同一用户需使用不同数字 | 
cURL example:
   curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/server/id/{id}?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}'
Response data:
| Name | Type | Description | 
|---|---|---|
| id | string | 邮件服务器的ID | 
| name | string | 邮件服务器名称 | 
| account | string | 邮箱服务的账号 | 
| authCode | string | 授权码 | 
| serverHost | string | 服务的地址 | 
| serverPort | string | 服务的端口号 | 
| userId | string | 用户ID | 
| userName | string | 用户名称 | 
| type | int | 1云端 | 
Response example:
{
    "data": {
        "id": "8ae490a470395eae01703c5aba040001",
        "name": "ttttt",
        "account": "112****798@qq.com",
        "authCode": "1111",
        "serverHost": "127.0.0.2",
        "serverPort": "555",
        "type": 1,
        "userId": "38869",
        "userName": "zhongsheng"
    },
    "success": true,
    "code": 0,
    "msg": null
}
功能描述:删除邮箱服务器。
DELETE  /api/v1/mail/server/id/{id}
Path:
| Name | Type | Description | Required | 
|---|---|---|---|
| id | string | 邮件服务器的ID | Yes | 
cURL example:
   curl --location --request DELETE '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/server/id/{id}?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}'
Response example:
{
    "success": true,
    "code": 0,
    "msg": null,
    "data": null
}
功能描述:新增邮箱服务器。
POST  /api/v1/mail/server/add
Body:
| Name | Type | Description | Required | 
|---|---|---|---|
| name | string | 邮箱服务名称 | Yes | 
| account | string | 邮箱服务的账号,长度小于30 | Yes | 
| authCode | string | 授权码 | Yes | 
| serverHost | string | 服务的地址 | Yes | 
| serverPort | string | 服务的端口号 | Yes | 
| type | int | 1云端 | Yes | 
Body example:
{
    "name": "ttttt1",
    "account": "1129018798@qq.com",
    "authCode": "1111",
    "serverHost": "127.0.0.2",
    "serverPort": "555",
    "type": 1
}
cURL example:
   curl --location --request POST '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/server/add?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}' \
 --header 'Content-Type: application/json' \
 --data-raw '{
     "name": "ttttt1",
     "account": "1129018798@qq.com",
     "authCode": "1111",
     "serverHost": "127.0.0.2",
     "serverPort": "555",
     "type": 1
 }'
Response data:
| Name | Type | Description | 
|---|---|---|
| id | string | 邮件服务器的ID | 
| name | string | 邮件服务器名称 | 
| account | string | 邮箱服务的账号 | 
| authCode | string | 授权码 | 
| serverHost | string | 服务的地址 | 
| serverPort | string | 服务的端口号 | 
| userId | string | 用户ID | 
| userName | string | 用户名称 | 
| type | int | 1云端 | 
Response example:
{
    "data": {
        "id": "8ae490a470395eae01703c5b0b8d0002",
        "name": "ttttt1",
        "account": "112****798@qq.com",
        "authCode": "1111",
        "serverHost": "127.0.0.2",
        "serverPort": "555",
        "userId": "38869",
        "userName": "zhongsheng",
        "type": 1
    },
    "success": true,
    "code": 0,
    "msg": null
}
功能描述:编辑邮箱服务器。
PUT  /api/v1/mail/server/update
Body:
| Name | Type | Description | Required | 
|---|---|---|---|
| id | string | 邮箱服务ID | Yes | 
| name | string | 邮箱服务名称 | No | 
| account | string | 邮箱服务的账号 | No | 
| authCode | string | 授权码 | No | 
| serverHost | string | 服务的地址 | No | 
| serverPort | string | 服务的端口号 | No | 
| type | int | 1云端 | No | 
Body example:
{
    "id":"8ae490a470395eae01703c5b0b8d0002",
    "name": "ttttt2",
    "account": "1129018798@qq.com",
    "authCode": "1111",
    "serverHost": "127.0.0.2",
    "serverPort": "555",
    "type": 1
}
cURL example:
   curl --location --request PUT '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/server/update?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}' \
 --header 'Content-Type: application/json' \
 --data-raw '{
     "id":"8ae490a470395eae01703c5b0b8d0002",
     "name": "ttttt2",
     "account": "1129018798@qq.com",
     "authCode": "1111",
     "serverHost": "127.0.0.2",
     "serverPort": "555",
     "type": 1
 }'
Response example:
{
    "success": true,
    "code": 0,
    "msg": null,
    "data": null
}
功能描述:获取邮件模板列表。
GET  /api/v1/mail/pattern/query/page
Body:
| Name | Type | Description | Required | 
|---|---|---|---|
| currentPage | int | 当前页码 | Yes | 
| pageSize | int | 每页的数据数量 | Yes | 
| filter | struct | 查询参数 | No | 
filter的子对象结构体:
| Name | Type | Description | Required | 
|---|---|---|---|
| name | string | 查询的名字 | Yes | 
Body example:
{"currentPage":1,"pageSize":1,"filter":{"name":"string"}}
cURL example:
   curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/pattern/query/page?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}' \
 --header 'Content-Type: application/json' \
 --data-raw '{
 "currentPage":1,
 "pageSize":1,
 "filter":{"name":"string"}
 }'
Response data:
| Name | Type | Description | 
|---|---|---|
| totalCount | int | 总数量 | 
| pageSize | int | 分页大小 | 
| currentPage | int | 页码 | 
| totalPage | int | 总页数 | 
| content | struct[] | 内容 | 
Response data content的子对象结构体:
| Name | Type | Description | 
|---|---|---|
| id | string | 邮件模板的ID | 
| name | string | 邮件模板名称 | 
| content | string | 模板内容 | 
| type | int | 1云端 | 
Response example:
{
    "success": true,
    "code": 0,
    "msg": "",
    "data": {
        "currentPage": 1,
        "pageSize": 5,
        "totalCount": 2,
        "totalPage": 1,
        "content": [
            {
                "id": "5d142f74688d5c0006ecb930",
                "name": "ljztest",
                "content": "xxxx",
                "type": 1
            }
        ]
      }
}
功能描述:查询邮箱模板详情。
GET  /api/v1/mail/pattern/id/{id}
Path:
| Name | Type | Description | Required | 
|---|---|---|---|
| id | string | 邮件模板的ID | Yes | 
cURL example:
   curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/pattern/id/{id}?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}'
Response data:
| Name | Type | Description | 
|---|---|---|
| id | string | 邮件模板的ID | 
| name | string | 邮件模板名称 | 
| content | string | 模板内容 | 
| type | int | 1云端 | 
Response example:
{
    "success": true,
    "code": 0,
    "msg": "",
    "data": {
          "id": "5d142f74688d5c0006ecb930",
          "name": "ljztest",
          "content": "xxxx",
          "type": 1
       }
}
功能描述:删除邮箱模板。
DELETE  /api/v1/mail/pattern/id/{id}
Path:
| Name | Type | Description | Required | 
|---|---|---|---|
| id | string | 邮件模板的ID | Yes | 
cURL example:
   curl --location --request DELETE '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/pattern/id/{id}?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}'
Response example:
{
    "success": true,
    "code": 0,
    "msg": null,
    "data": null
}
功能描述:新增邮箱模板。
POST  /api/v1/mail/pattern/add
Body:
| Name | Type | Description | Required | 
|---|---|---|---|
| name | string | 邮箱模板名称 | Yes | 
| content | string | 模板内容 | Yes | 
| type | int | 1云端 | Yes | 
Body example:
{
    "name":"testljz",
    "content":"sdsds",
    "type": 1
}
cURL example:
   curl --location --request POST '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/pattern/add?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}' \
 --header 'Content-Type: application/json' \
 --data-raw '{
     "name":"testljz",
     "content":"sdsds",
    "type": 1
 }'
Response data:
| Name | Type | Description | 
|---|---|---|
| id | string | 邮件模板的ID | 
| name | string | 邮件模板名称 | 
| content | string | 模板内容 | 
| type | int | 1云端 | 
Response example:
{
    "data": {
        "id": "8ae491b870e64bb50170e654f2ce0000",
        "name": "testljz",
        "content": "sdsds",
        "type": 0
    },
    "success": true,
    "code": 0,
    "msg": null
}
功能描述:编辑邮箱模板。
PUT  /api/v1/mail/pattern/update
Body:
| Name | Type | Description | Required | 
|---|---|---|---|
| id | string | 邮箱模板ID | Yes | 
| name | string | 邮箱模板名称 | No | 
| content | string | 模板内容 | No | 
| type | int | 1云端 | No | 
Body example:
{
    "id": "8ae48daf7163309a0171f217af120017",
    "name":"testljz11",
    "content":"sdsds",
    "type": 1
}
cURL example:
   curl --location --request PUT '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/mail/pattern/update?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
 --header 'platform: 1' \
 --header 'projectId: {projectId}' \
 --header 'Content-Type: application/json' \
 --data-raw '{
    "id": "8ae48daf7163309a0171f217af120017",
     "name":"testljz11",
     "content":"sdsds",
    "type": 1
 }'
Response example:
{
    "success": true,
    "code": 0,
    "msg": null,
    "data": null
}