fix: removed env variable, configured a form field for editing email connect host

This commit is contained in:
Cahit Atilgan
2025-05-15 14:27:08 +02:00
parent 2b046dfe18
commit a3a381aad1
5 changed files with 14 additions and 1 deletions

View File

@@ -122,6 +122,15 @@ const SettingsEmail = ({
</Button>
</Box>
)}
<Box>
<Typography>{t("systemEmailConnectionHost")}</Typography>
<TextInput
name="systemEmailConnectionHost"
placeholder="bluewavelabs.ca"
value={settingsData?.settings?.systemEmailConnectionHost ?? ""}
onChange={handleChange}
/>
</Box>
<Box>
<Button
variant="contained"

View File

@@ -307,6 +307,7 @@ const advancedSettingsValidation = joi.object({
systemEmailPort: joi.number().allow(null, ""),
systemEmailAddress: joi.string().allow(""),
systemEmailPassword: joi.string().allow(""),
systemEmailConnectionHost: joi.string().allow(""),
jwtTTLNum: joi.number().messages({
"number.base": "JWT TTL is required.",
}),

View File

@@ -120,6 +120,7 @@
"settingsEmailPassword": "Email password",
"settingsEmailUser": "Email user",
"settingsEmailFieldResetLabel": "Password is set. Click Reset to change it.",
"systemEmailConnectionHost":"Email connection host",
"backendUnreachable": "Server Connection Error",
"backendUnreachableMessage": "We're unable to connect to the server. Please check your internet connection or verify your deployment configuration if the problem persists.",
"backendUnreachableError": "Cannot connect to the server. Please try again later.",

View File

@@ -28,6 +28,9 @@ const AppSettingsSchema = mongoose.Schema(
systemEmailUser: {
type: String,
},
systemEmailConnectionHost: {
type: String,
},
singleton: {
type: Boolean,
required: true,

View File

@@ -7,7 +7,6 @@ const envConfig = {
systemEmailUser: process.env.SYSTEM_EMAIL_USER,
systemEmailAddress: process.env.SYSTEM_EMAIL_ADDRESS,
systemEmailPassword: process.env.SYSTEM_EMAIL_PASSWORD,
systemEmailConnectionHost: process.env.SYSTEM_EMAIL_CONNECTION_HOST,
jwtSecret: process.env.JWT_SECRET,
jwtTTL: process.env.TOKEN_TTL,
clientHost: process.env.CLIENT_HOST,