diff --git a/app/(protected)/admin/system/app-configs.tsx b/app/(protected)/admin/system/app-configs.tsx index c208b46..a0b2521 100644 --- a/app/(protected)/admin/system/app-configs.tsx +++ b/app/(protected)/admin/system/app-configs.tsx @@ -35,6 +35,7 @@ export default function AppConfigs({}: {}) { } = useSWR>("/api/admin/configs", fetcher); const [notification, setNotification] = useState(""); const [catchAllEmails, setCatchAllEmails] = useState(""); + const [forwardEmailTargets, setForwardEmailTargets] = useState(""); const [emailSuffix, setEmailSuffix] = useState(""); const [tgBotToken, setTgBotToken] = useState(""); const [tgChatId, setTgChatId] = useState(""); @@ -52,8 +53,9 @@ export default function AppConfigs({}: {}) { setTgChatId(configs?.tg_email_chat_id); setTgTemplate(configs?.tg_email_template); setTgWhiteList(configs?.tg_email_target_white_list); + setForwardEmailTargets(configs?.email_forward_targets); } - // 计算登录方式数量 + if (!isLoading) { let count = 0; if (configs?.enable_google_oauth) count++; @@ -365,7 +367,7 @@ export default function AppConfigs({}: {}) {
- {/* Catch-All */} + {/* Catch-All*/}
@@ -445,6 +447,82 @@ export default function AppConfigs({}: {}) {
+ {/* Forward Email to other email address */} + + +
+

+ {t("Email Forwarding")} +

+

+ {t( + "If enabled, forward all received emails to other platform email addresses (Send with Resend)", + )} +

+
+ {configs && ( +
e.stopPropagation()} + > + {configs.enable_email_forward && + !configs.email_forward_targets && ( + + {" "} + {t("Need to configure")} + + )} + + handleChange(v, "enable_email_forward", "BOOLEAN") + } + /> + +
+ )} +
+ +
+
+

{t("Forward Email Targets")}

+

+ {t( + "Set forward email address targets, split by comma if more than one, such as: 1@a-com,2@b-com, Only works when email forwarding is enabled", + )} +

+
+ {configs && ( +
+