feat: add SEND_MAIL delivery and quota controls (#986)

* feat: add SEND_MAIL delivery and quota controls

* test: cover -1 unlimited runtime for send mail quota

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: split send limit validation and save

* refactor: move send limit counters to settings

* fix: polish send mail limit review follow-ups

* docs: note SEND_MAIL breaking change

* test: align send mail limit e2e with new messages

* fix: address review follow-ups

* fix: harden admin send mail handlers

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dream Hunter
2026-04-17 11:37:14 +08:00
committed by GitHub
co-authored by Claude Opus 4.7
parent a5aa475380
commit e772db8c3e
16 changed files with 1032 additions and 54 deletions
+3 -1
View File
@@ -71,7 +71,9 @@ const messages: LocaleMessages = {
ContentEmptyMsg: "Content is empty",
AlreadyRequestedMsg: "Already requested",
EnableResendOrSmtpMsg: "Please enable resend or smtp for this domain",
EnableResendOrSmtpWithVerifiedMsg: "Please enable resend or smtp for this domain, or add recipient to verified address list",
EnableResendOrSmtpOrSendMailMsg: "Please enable resend, smtp or SEND_MAIL for this domain",
ServerSendMailDailyLimitMsg: "Server daily send quota has been reached",
ServerSendMailMonthlyLimitMsg: "Server monthly send quota has been reached",
InvalidToMailMsg: "Invalid recipient address",
// Admin related
+3 -1
View File
@@ -69,7 +69,9 @@ export type LocaleMessages = {
ContentEmptyMsg: string
AlreadyRequestedMsg: string
EnableResendOrSmtpMsg: string
EnableResendOrSmtpWithVerifiedMsg: string
EnableResendOrSmtpOrSendMailMsg: string
ServerSendMailDailyLimitMsg: string
ServerSendMailMonthlyLimitMsg: string
InvalidToMailMsg: string
// Admin related
+3 -1
View File
@@ -71,7 +71,9 @@ const messages: LocaleMessages = {
ContentEmptyMsg: "内容不能为空",
AlreadyRequestedMsg: "已经申请过了",
EnableResendOrSmtpMsg: "请先为此域名启用 resend 或 smtp",
EnableResendOrSmtpWithVerifiedMsg: "请先为此域名启用 resendsmtp,或将收件人添加到已验证地址列表",
EnableResendOrSmtpOrSendMailMsg: "请先为此域名启用 resendsmtp 或 SEND_MAIL",
ServerSendMailDailyLimitMsg: "服务器今日发信次数已达上限",
ServerSendMailMonthlyLimitMsg: "服务器本月发信次数已达上限",
InvalidToMailMsg: "收件人地址无效",
// Admin related