From a143ad132ab48b6fc936959e521183b39f7d0dc5 Mon Sep 17 00:00:00 2001 From: "MSI\\derek" Date: Tue, 10 Sep 2024 13:20:28 +0800 Subject: [PATCH] for testing email functions --- src/components/MailSetting/MailSetting.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/components/MailSetting/MailSetting.tsx b/src/components/MailSetting/MailSetting.tsx index 4afdd41..d8daaeb 100644 --- a/src/components/MailSetting/MailSetting.tsx +++ b/src/components/MailSetting/MailSetting.tsx @@ -17,7 +17,7 @@ import { import { Tab, Tabs, TabsProps, Typography } from "@mui/material"; import TimesheetMailDetails from "./TimesheetMailDetails"; import { Error } from "@mui/icons-material"; -import { MailSave, saveMail, testMail } from "@/app/api/mail/actions"; +import { MailSave, saveMail, testEveryone, test7th, test15th } from "@/app/api/mail/actions"; import SettingDetails from "./SettingDetails"; import { errorDialog, submitDialog, successDialog } from "../Swal/CustomAlerts"; @@ -91,7 +91,18 @@ const MailSetting: React.FC = ({ console.log(response) if (response !== null) { if (test) { - await testMail() + let msg = "" + try { + msg = "testEveryone" + await testEveryone() + msg = "test7th" + await test7th() + msg = "test15th" + await test15th() + } catch (error) { + console.log(error) + console.log(msg) + } } successDialog(t("Save Success"), t) @@ -169,7 +180,7 @@ const MailSetting: React.FC = ({ {t("Cancel")}