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 { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornments";
|
||||||
import { useSendTestEmail } from "../../Hooks/useSendTestEmail";
|
import { useSendTestEmail } from "../../Hooks/useSendTestEmail";
|
||||||
import { createToast } from "../../Utils/toastUtils";
|
import { createToast } from "../../Utils/toastUtils";
|
||||||
|
import { Switch } from "@mui/material";
|
||||||
|
|
||||||
const SettingsEmail = ({
|
const SettingsEmail = ({
|
||||||
isAdmin,
|
isAdmin,
|
||||||
@@ -53,6 +54,10 @@ const SettingsEmail = ({
|
|||||||
systemEmailAddress: settingsData?.settings?.systemEmailAddress,
|
systemEmailAddress: settingsData?.settings?.systemEmailAddress,
|
||||||
systemEmailPassword: password || settingsData?.settings?.systemEmailPassword,
|
systemEmailPassword: password || settingsData?.settings?.systemEmailPassword,
|
||||||
systemEmailConnectionHost: settingsData?.settings?.systemEmailConnectionHost,
|
systemEmailConnectionHost: settingsData?.settings?.systemEmailConnectionHost,
|
||||||
|
systemEmailTLSServername: settingsData?.settings?.systemEmailTLSServername,
|
||||||
|
systemEmailIgnoreTLS: settingsData?.settings?.systemEmailIgnoreTLS,
|
||||||
|
systemEmailRequireTLS: settingsData?.settings?.systemEmailRequireTLS,
|
||||||
|
systemEmailRejectUnauthorized: settingsData?.settings?.systemEmailRejectUnauthorized,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Basic validation
|
// Basic validation
|
||||||
@@ -155,6 +160,44 @@ const SettingsEmail = ({
|
|||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</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>
|
<Box>
|
||||||
<Typography>{t("settingsEmailConnectionHost")}</Typography>
|
<Typography>{t("settingsEmailConnectionHost")}</Typography>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
|||||||
@@ -679,6 +679,10 @@
|
|||||||
"settingsEmailPassword": "Email password - Password for authentication",
|
"settingsEmailPassword": "Email password - Password for authentication",
|
||||||
"settingsEmailUser": "Email user - Username for authentication, overrides email address if specified",
|
"settingsEmailUser": "Email user - Username for authentication, overrides email address if specified",
|
||||||
"settingsEmailFieldResetLabel": "Password is set. Click Reset to change it.",
|
"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",
|
"state": "State",
|
||||||
"statusBreadCrumbsStatusPages": "Status Pages",
|
"statusBreadCrumbsStatusPages": "Status Pages",
|
||||||
"statusBreadCrumbsDetails": "Details",
|
"statusBreadCrumbsDetails": "Details",
|
||||||
|
|||||||
Reference in new issue
Block a user