display transport settings
This commit is contained in:
1 parent
d10341ac2f
commit
3faa6194f3
2 files changed
+46
-2
No files matched your search
@@ -5,7 +5,7 @@ import PropTypes from "prop-types";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Link as RouterLink } from "react-router-dom";
|
import { Link as RouterLink } from "react-router-dom";
|
||||||
|
|
||||||
const TextLink = ({ text, linkText, href }) => {
|
const TextLink = ({ text, linkText, href, target = "_self" }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -18,6 +18,7 @@ const TextLink = ({ text, linkText, href }) => {
|
|||||||
color="accent"
|
color="accent"
|
||||||
to={href}
|
to={href}
|
||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
|
target={target}
|
||||||
>
|
>
|
||||||
{linkText}
|
{linkText}
|
||||||
</Link>
|
</Link>
|
||||||
@@ -29,6 +30,7 @@ TextLink.propTypes = {
|
|||||||
text: PropTypes.string,
|
text: PropTypes.string,
|
||||||
linkText: PropTypes.string,
|
linkText: PropTypes.string,
|
||||||
href: PropTypes.string,
|
href: PropTypes.string,
|
||||||
|
target: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default TextLink;
|
export default TextLink;
|
||||||
@@ -4,6 +4,8 @@ import ConfigBox from "../../Components/ConfigBox";
|
|||||||
import TextInput from "../../Components/Inputs/TextInput";
|
import TextInput from "../../Components/Inputs/TextInput";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Stack from "@mui/material/Stack";
|
import Stack from "@mui/material/Stack";
|
||||||
|
import { Switch } from "@mui/material";
|
||||||
|
import TextLink from "../../Components/TextLink";
|
||||||
// Utils
|
// Utils
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { PropTypes } from "prop-types";
|
import { PropTypes } from "prop-types";
|
||||||
@@ -12,7 +14,6 @@ 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,
|
||||||
@@ -239,6 +240,47 @@ const SettingsEmail = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
<TextLink
|
||||||
|
text="This builds an SMTP transport for NodeMailer"
|
||||||
|
linkText="See specifications here"
|
||||||
|
href="https://nodemailer.com/smtp"
|
||||||
|
target="_blank"
|
||||||
|
/>
|
||||||
|
<Box
|
||||||
|
component={"pre"}
|
||||||
|
sx={{
|
||||||
|
fontFamily: "monospace",
|
||||||
|
p: 2,
|
||||||
|
borderRadius: 1,
|
||||||
|
overflow: "auto",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<code>
|
||||||
|
{JSON.stringify(
|
||||||
|
{
|
||||||
|
host: systemEmailHost,
|
||||||
|
port: systemEmailPort,
|
||||||
|
secure: systemEmailSecure,
|
||||||
|
auth: {
|
||||||
|
user: systemEmailUser || systemEmailAddress,
|
||||||
|
pass: "<your_password>",
|
||||||
|
},
|
||||||
|
name: systemEmailConnectionHost || "localhost",
|
||||||
|
pool: systemEmailPool,
|
||||||
|
user: systemEmailUser,
|
||||||
|
tls: {
|
||||||
|
rejectUnauthorized: systemEmailRejectUnauthorized,
|
||||||
|
ignoreTLS: systemEmailIgnoreTLS,
|
||||||
|
requireTLS: systemEmailRequireTLS,
|
||||||
|
servername: systemEmailTLSServername,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
2
|
||||||
|
)}
|
||||||
|
</code>
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box>
|
<Box>
|
||||||
|
|||||||
Reference in new issue
Block a user