Feat: New Email Settings
This commit is contained in:
1 parent
ec25ebee35
commit
01ed3d8aaa
2 files changed
+47
No files matched your search
@@ -12,6 +12,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornments";
|
||||
import { useSendTestEmail } from "../../Hooks/useSendTestEmail";
|
||||
import { createToast } from "../../Utils/toastUtils";
|
||||
import { Switch } from "@mui/material";
|
||||
|
||||
const SettingsEmail = ({
|
||||
isAdmin,
|
||||
@@ -53,6 +54,10 @@ const SettingsEmail = ({
|
||||
systemEmailAddress: settingsData?.settings?.systemEmailAddress,
|
||||
systemEmailPassword: password || settingsData?.settings?.systemEmailPassword,
|
||||
systemEmailConnectionHost: settingsData?.settings?.systemEmailConnectionHost,
|
||||
systemEmailTLSServername: settingsData?.settings?.systemEmailTLSServername,
|
||||
systemEmailIgnoreTLS: settingsData?.settings?.systemEmailIgnoreTLS,
|
||||
systemEmailRequireTLS: settingsData?.settings?.systemEmailRequireTLS,
|
||||
systemEmailRejectUnauthorized: settingsData?.settings?.systemEmailRejectUnauthorized,
|
||||
};
|
||||
|
||||
// Basic validation
|
||||
@@ -155,6 +160,44 @@ const SettingsEmail = ({
|
||||
</Button>
|
||||
</Box>
|
||||
)}
|
||||
<Box>
|
||||
<Typography>
|
||||
{t("settingsEmailTLSServername")}
|
||||
</Typography>
|
||||
<TextInput
|
||||
name="systemEmailTLSServername"
|
||||
placeholder="bluewavelabs.ca"
|
||||
value={settingsData?.settings?.systemEmailTLSServername ?? ""}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
gap: theme.spacing(4),
|
||||
}}
|
||||
>
|
||||
<Typography>{t("settingsEmailIgnoreTLS")}</Typography>
|
||||
<Switch
|
||||
name="systemEmailIgnoreTLS"
|
||||
checked={settingsData?.settings?.systemEmailIgnoreTLS ?? false}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<Typography>{t("settingsEmailRequireTLS")}</Typography>
|
||||
<Switch
|
||||
name="systemEmailRequireTLS"
|
||||
checked={settingsData?.settings?.systemEmailRequireTLS ?? false}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<Typography>{t("settingsEmailRejectUnauthorized")}</Typography>
|
||||
<Switch
|
||||
name="systemEmailRejectUnauthorized"
|
||||
checked={settingsData?.settings?.systemEmailRejectUnauthorized ?? false}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography>{t("settingsEmailConnectionHost")}</Typography>
|
||||
<TextInput
|
||||
|
||||
@@ -679,6 +679,10 @@
|
||||
"settingsEmailPassword": "Email password - Password for authentication",
|
||||
"settingsEmailUser": "Email user - Username for authentication, overrides email address if specified",
|
||||
"settingsEmailFieldResetLabel": "Password is set. Click Reset to change it.",
|
||||
"settingsEmailTLSServername": "TLS Servername - Optional Hostname for TLS Validation when host is an IP",
|
||||
"settingsEmailIgnoreTLS": "Ignore TLS",
|
||||
"settingsEmailRequireTLS": "Require TLS",
|
||||
"settingsEmailRejectUnauthorized": "Reject Unauthorized",
|
||||
"state": "State",
|
||||
"statusBreadCrumbsStatusPages": "Status Pages",
|
||||
"statusBreadCrumbsDetails": "Details",
|
||||
|
||||
Reference in new issue
Block a user