- Development Integration
- /
- SDK
- /
- Python
- /
Management Module
- /
管理消息服务
- /
- 配置第三方邮件服务
¶ Configure third-party email service
Update time: 2025-07-23 07:34:21
Configure third-party email service
¶ Method name
AuthenticationClient.config_email_provider
¶ Request parameters
Name | Type | Is it required | Default value | Description | Sample value |
---|---|---|---|---|---|
type | string | Yes | - | Third-party email service provider type: - custom : Custom SMTP Mail service- ali : Ali Enterprise Mailbox (opens new window)- qq : Tencent Enterprise Mailbox (opens new window)- sendgrid : SendGrid Mail Service (opens new window) | custom |
enabled | boolean | yes | - | Whether to enable. If not enabled, the built-in mail service of GenAuth will be used by default | true |
smtpConfig | SMTPEmailProviderConfigInput | no | - | SMTP mail service configuration | |
sendGridConfig | SendGridEmailProviderConfigInput | no | - | SendGrid mail service configuration | |
aliExmailConfig | AliExmailEmailProviderConfigInput | No | - | Ali Enterprise Email Service Configuration | |
tencentExmailConfig | TencentExmailEmailProviderConfigInput | No | - | Tencent Enterprise Email Service Configuration |
¶ Request Response
Type: EmailProviderRespDto
Name | Type | Description |
---|---|---|
statusCode | number | Business status code, which can be used to determine whether the operation is successful, 200 means success. |
message | string | Description |
apiCode | number | Segmented error code, which can be used to get the specific error type. |
requestId | string | Request ID. It will be returned when the request fails. |
data | EmailProviderDto | Response data |
Example results:
{
"statusCode": 200,
"message": "Success",
"requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
"data": {
"enabled": true,
"type": "custom",
"smtpConfig": {
"smtp_host": "smtp.example.com",
"smtp_port": 465,
"sender": "test",
"senderPass": "passw0rd",
"secure": true
},
"sendGridConfig": {
"sender": "test",
"apikey": "xxxxxxxxxx"
},
"aliExmailConfig": {
"sender": "test",
"senderPass": "passw0rd"
},
"tencentExmailConfig": {
"sender": "test",
"senderPass": "passw0rd"
}
}
}
¶ Data Structure
¶ SMTPEmailProviderConfigInput
Name | Type | Is this field required? | Description | Sample value |
---|---|---|---|---|
smtp_host | string | yes | SMTP address | smtp.example.com |
smtp_port | number | yes | SMTP port | 465 |
sender | string | no | Username | test |
senderPass | string | yes | Password | passw0rd |
secure | boolean | no | Is SSL enabled? | true |
¶ SendGridEmailProviderConfigInput
Name | Type | Required | Description | Sample value |
---|---|---|---|---|
sender | string | yes | Username | test |
apikey | string | yes | SendGrid API Key, see the SendGrid documentation (opens new window) for details. | xxxxxxxxxx |
¶ AliExmailEmailProviderConfigInput
Name | Type | Is it required | Description | Sample value |
---|---|---|---|---|
sender | string | Yes | Username | test |
senderPass | string | Yes | Password | passw0rd |
¶ TencentExmailEmailProviderConfigInput
Name | Type | Is it required | Description | Example value |
---|---|---|---|---|
sender | string | yes | username | test |
senderPass | string | yes | password | passw0rd |
¶ EmailProviderDto
Name | Type | Is it required? | Description | Sample value |
---|---|---|---|---|
enabled | boolean | yes | Whether to enable. If not enabled, the built-in mail service of GenAuth will be used by default | true |
type | string | no | Third-party mail service provider type: - custom : Custom SMTP mail service- ali : Ali Enterprise Mailbox (opens new window)- qq : Tencent Enterprise Mailbox (opens new window)- sendgrid : SendGrid Mail Service (opens new window) | ali |
smtpConfig | No | SMTP mail service configuration Nested type: SMTPEmailProviderConfig. | ||
sendGridConfig | No | SendGrid mail service configuration Nested type: SendGridEmailProviderConfig. | ||
aliExmailConfig | No | Ali enterprise mail service configuration Nested type: AliExmailEmailProviderConfig. | ||
tencentExmailConfig | No | Tencent enterprise mail service configuration Nested type: TencentExmailEmailProviderConfig. |
¶ SMTPEmailProviderConfig
Name | Type | Required | Description | Sample value |
---|---|---|---|---|
smtp_host | string | yes | SMTP address | smtp.example.com |
smtp_port | number | yes | SMTP port | 465 |
sender | string | yes | Username | test |
senderPass | string | yes | Password | passw0rd |
secure | boolean | yes | Enable SSL | true |
¶ SendGridEmailProviderConfig
Name | Type | Required | Description | Sample value |
---|---|---|---|---|
sender | string | Yes | Username | test |
apikey | string | Yes | SendGrid API Key, see the SendGrid documentation (opens new window) for details. | xxxxxxxxxx |
¶ AliExmailEmailProviderConfig
Name | Type | Is it required? | Description | Sample value |
---|---|---|---|---|
sender | string | Yes | Username | test |
senderPass | string | Yes | Password | passw0rd |
¶ TencentExmailEmailProviderConfig
Name | Type | Is it required? | Description | Sample value |
---|---|---|---|---|
sender | string | Yes | Username | test |
senderPass | string | yes | password | passw0rd |