mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 10:21:55 +00:00
Merge branches 'master' and 'master' of github.com:Start9Labs/start-sdk
This commit is contained in:
55
lib/config/constants.ts
Normal file
55
lib/config/constants.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import { Config, Value, Variants } from "./builder"
|
||||||
|
|
||||||
|
export const smtpConfig = Value.union(
|
||||||
|
{
|
||||||
|
name: "SMTP",
|
||||||
|
description: "Optionally provide an SMTP server for sending email",
|
||||||
|
required: { default: "disabled" },
|
||||||
|
},
|
||||||
|
Variants.of({
|
||||||
|
disabled: { name: "Disabled", spec: Config.of({}) },
|
||||||
|
system: { name: "System Credentials", spec: Config.of({}) },
|
||||||
|
custom: {
|
||||||
|
name: "Custom Credentials",
|
||||||
|
spec: Config.of({
|
||||||
|
server: Value.text({
|
||||||
|
name: "SMTP Server",
|
||||||
|
required: {
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
port: Value.number({
|
||||||
|
name: "Port",
|
||||||
|
required: { default: 587 },
|
||||||
|
min: 1,
|
||||||
|
max: 65535,
|
||||||
|
integer: true,
|
||||||
|
}),
|
||||||
|
from: Value.text({
|
||||||
|
name: "From Address",
|
||||||
|
required: {
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
placeholder: "<name>test@example.com",
|
||||||
|
inputmode: "email",
|
||||||
|
}),
|
||||||
|
login: Value.text({
|
||||||
|
name: "Login",
|
||||||
|
required: {
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
password: Value.text({
|
||||||
|
name: "Password",
|
||||||
|
required: false,
|
||||||
|
}),
|
||||||
|
tls: Value.toggle({
|
||||||
|
name: "Require Transport Security",
|
||||||
|
default: true,
|
||||||
|
description:
|
||||||
|
"Require TLS transport security. If disabled, email will use plaintext by default and TLS via STARTTLS <strong>if the SMTP server supports it</strong>. If enabled, email will refuse to connect unless the server supports STARTTLS.",
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user