MailHub
主动给用户发送
C2S POST /bp/user/me/mail_hub/send
S2S POST /bp/server/user/{user_id}/mail_hub/send
接口功能:主动给用户发送邮件
请求头部参数 (Headers):
请求体
content-type: "application/json"
描述:邮件发送所需信息
参数类型
名字 类型 示例 是否必填 描述 name string download true console 配置的 email strategy 名称 email_to string example@example.com false 收件人邮箱,不传或者为空,会使用用户绑定的邮箱 请求体示例:
json
{
"name": "download",
"email_to": "example@example.com"
}响应
HTTP 状态码:200
描述:成功 响应示例:
json
{}HTTP 状态码:4xx 描述:错误 响应示例:
json
{
"error": {
"error_type": "invalid_parameter",
"message": "xxxxx"
}
}error_type:
- invalid_parameter(参数错误)
- mail_hub.api_email_invalid (enable_api_email 为 false 且发送接口 email_to 不为空)
- mail_hub.email_to_invalid (email_to 邮件地址校验失败)
- mail_hub.send_duplicate (该策略已经还在发送中)
