Repository navigation
feat(email): 邮件服务只留自定义 SMTP,Brevo 下线 - #109
Merged
Merged
Conversation
删 brevo_provider 与 factory 双分支;存量 brevo 配置在读取与 发送两侧都显式降级(warning + 按未配置处理),不做静默兼容。 settings API 删 api_key 相关字段,PUT 传 brevo 明确 400 提示改配 SMTP。
删 provider 下拉、Brevo 指引与 API Key 输入;类型同步删 api_key / supported_providers 字段。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
自定义 SMTP(企业邮箱/自建)已足够覆盖事务邮件(注册验证码)需求,Brevo 的第三方 API 与账号审核流程不再保留。本 PR 移除 Brevo provider:删
brevo_provider.py与 factory 双分支,settings API 删 api_key 相关字段,前端邮件面板固定为 SMTP 单表单,README 双语同步。存量 brevo 配置显式降级,不留兼容路径:GET 归一展示为未配置、发送侧 factory 记 warning 后按未配置处理(验证码请求报「邮件服务未配置」),管理员重配 SMTP 后恢复;PUT 传 brevo 得到带指引的 400。
Fixes #108
Area
Verification
python -m pytest <relevant> -qpassestests/test_email_smtp_only.py5/5:brevo 400(含错误文案)、SMTP 必填校验、往返脱敏 + 密码留空保留、存量 brevo 配置 GET 归一 + factory 降级、SMTP 工厂闭环test_email_verification_cleanup/test_admin_api_permissions全过make test-backend(一次性 PG,端口 5439):exit 0,无 FAILEDnpx tsc --noEmitpassesnpm run test:coveragepasses(含覆盖率门禁)ruff check + format/check_agent_docs.py/check_layering.py全过Verifier verdict
行为变更切片;CI 六项为机器 Verifier(自 #106 起 security-scan 已恢复可判绿),全量后端 + 前端双门禁本地已过。存量配置降级行为有专项断言(显式 warning + None,不静默)。
Checklist
issue-108-remove-brevo;正文Fixes #108Notes for reviewer
email_provider_configJSON 未做迁移:存量行留着无害(读取路径忽略非 smtp 并告警),重新保存时整体覆盖。