feat(settings): restore From-header preview block under SMTP transport JSON
Brings back the second pre-block I dropped when consolidating the preview. The transport JSON shows what's handed to nodemailer createTransport; the From-header block shows the rendered envelope recipients will see — they answer different questions and both belong. Conditioned on systemEmailAddress so empty configs don't render an empty pre.
This commit is contained in:
1 parent
e71892d0bc
commit
e11553c218
1 file changed
+53
-35
@@ -586,42 +586,60 @@ export const SettingsPage = () => {
|
|||||||
const from =
|
const from =
|
||||||
displayName && address ? { name: displayName, address } : address;
|
displayName && address ? { name: displayName, address } : address;
|
||||||
return (
|
return (
|
||||||
<Box
|
<>
|
||||||
component="pre"
|
<Box
|
||||||
p={2}
|
component="pre"
|
||||||
borderRadius={theme.shape.borderRadius}
|
p={2}
|
||||||
bgcolor={theme.palette.action.hover}
|
borderRadius={theme.shape.borderRadius}
|
||||||
sx={{
|
bgcolor={theme.palette.action.hover}
|
||||||
fontFamily: theme.typography.fontFamilyMonospace,
|
sx={{
|
||||||
overflow: "auto",
|
fontFamily: theme.typography.fontFamilyMonospace,
|
||||||
}}
|
overflow: "auto",
|
||||||
>
|
}}
|
||||||
<code>
|
>
|
||||||
{JSON.stringify(
|
<code>
|
||||||
{
|
{JSON.stringify(
|
||||||
host: form.watch("systemEmailHost") || "",
|
{
|
||||||
port: form.watch("systemEmailPort") || "",
|
host: form.watch("systemEmailHost") || "",
|
||||||
secure: form.watch("systemEmailSecure") ?? false,
|
port: form.watch("systemEmailPort") || "",
|
||||||
auth: {
|
secure: form.watch("systemEmailSecure") ?? false,
|
||||||
user: form.watch("systemEmailUser") || address,
|
auth: {
|
||||||
pass: "<your_password>",
|
user: form.watch("systemEmailUser") || address,
|
||||||
|
pass: "<your_password>",
|
||||||
|
},
|
||||||
|
name: form.watch("systemEmailConnectionHost") || "localhost",
|
||||||
|
pool: form.watch("systemEmailPool") ?? false,
|
||||||
|
from,
|
||||||
|
tls: {
|
||||||
|
rejectUnauthorized:
|
||||||
|
form.watch("systemEmailRejectUnauthorized") ?? true,
|
||||||
|
ignoreTLS: form.watch("systemEmailIgnoreTLS") ?? false,
|
||||||
|
requireTLS: form.watch("systemEmailRequireTLS") ?? false,
|
||||||
|
servername: form.watch("systemEmailTLSServername") || "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
name: form.watch("systemEmailConnectionHost") || "localhost",
|
null,
|
||||||
pool: form.watch("systemEmailPool") ?? false,
|
2
|
||||||
from,
|
)}
|
||||||
tls: {
|
</code>
|
||||||
rejectUnauthorized:
|
</Box>
|
||||||
form.watch("systemEmailRejectUnauthorized") ?? true,
|
{address && (
|
||||||
ignoreTLS: form.watch("systemEmailIgnoreTLS") ?? false,
|
<Box
|
||||||
requireTLS: form.watch("systemEmailRequireTLS") ?? false,
|
component="pre"
|
||||||
servername: form.watch("systemEmailTLSServername") || "",
|
p={2}
|
||||||
},
|
borderRadius={theme.shape.borderRadius}
|
||||||
},
|
bgcolor={theme.palette.action.hover}
|
||||||
null,
|
sx={{
|
||||||
2
|
fontFamily: theme.typography.fontFamilyMonospace,
|
||||||
)}
|
overflow: "auto",
|
||||||
</code>
|
}}
|
||||||
</Box>
|
>
|
||||||
|
<code>
|
||||||
|
{`From: ${displayName ? `"${displayName}" <${address}>` : address}`}
|
||||||
|
</code>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
})()}
|
})()}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
Reference in new issue
Block a user