diff --git a/src/util/config/Config.ts b/src/util/config/Config.ts
index 583c148..d6f804b 100644
--- a/src/util/config/Config.ts
+++ b/src/util/config/Config.ts
@@ -21,6 +21,7 @@
CdnConfiguration,
ClientConfiguration,
DefaultsConfiguration,
+ EmailConfiguration,
EndpointConfiguration,
ExternalTokensConfiguration,
GeneralConfiguration,
@@ -35,7 +36,6 @@
RegisterConfiguration,
SecurityConfiguration,
SentryConfiguration,
- SMTPConfiguration,
TemplateConfiguration,
} from "../config";
@@ -59,5 +59,5 @@
sentry: SentryConfiguration = new SentryConfiguration();
defaults: DefaultsConfiguration = new DefaultsConfiguration();
external: ExternalTokensConfiguration = new ExternalTokensConfiguration();
- smtp: SMTPConfiguration = new SMTPConfiguration();
+ email: EmailConfiguration = new EmailConfiguration();
}
diff --git a/src/util/config/types/EmailConfiguration.ts b/src/util/config/types/EmailConfiguration.ts
new file mode 100644
index 0000000..1e4a036
--- /dev/null
+++ b/src/util/config/types/EmailConfiguration.ts
@@ -0,0 +1,25 @@
+/*
+ Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Fosscord and Fosscord Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export class EmailConfiguration {
+ host: string | null = null;
+ port: number | null = null;
+ secure: boolean | null = null;
+ username: string | null = null;
+ password: string | null = null;
+}
diff --git a/src/util/config/types/RegisterConfiguration.ts b/src/util/config/types/RegisterConfiguration.ts
index acbaa2d..689baa8 100644
--- a/src/util/config/types/RegisterConfiguration.ts
+++ b/src/util/config/types/RegisterConfiguration.ts
@@ -18,12 +18,13 @@
import {
DateOfBirthConfiguration,
- EmailConfiguration,
PasswordConfiguration,
+ RegistrationEmailConfiguration,
} from ".";
export class RegisterConfiguration {
- email: EmailConfiguration = new EmailConfiguration();
+ email: RegistrationEmailConfiguration =
+ new RegistrationEmailConfiguration();
dateOfBirth: DateOfBirthConfiguration = new DateOfBirthConfiguration();
password: PasswordConfiguration = new PasswordConfiguration();
disabled: boolean = false;
diff --git a/src/util/config/types/SMTPConfiguration.ts b/src/util/config/types/SMTPConfiguration.ts
deleted file mode 100644
index 11eb9e1..0000000
--- a/src/util/config/types/SMTPConfiguration.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Fosscord and Fosscord Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export class SMTPConfiguration {
- host: string | null = null;
- port: number | null = null;
- secure: boolean | null = null;
- username: string | null = null;
- password: string | null = null;
-}
diff --git a/src/util/config/types/index.ts b/src/util/config/types/index.ts
index 3d8ed6d..1431c12 100644
--- a/src/util/config/types/index.ts
+++ b/src/util/config/types/index.ts
@@ -20,6 +20,7 @@
export * from "./CdnConfiguration";
export * from "./ClientConfiguration";
export * from "./DefaultsConfiguration";
+export * from "./EmailConfiguration";
export * from "./EndpointConfiguration";
export * from "./ExternalTokensConfiguration";
export * from "./GeneralConfiguration";
@@ -34,6 +35,5 @@
export * from "./RegisterConfiguration";
export * from "./SecurityConfiguration";
export * from "./SentryConfiguration";
-export * from "./SMTPConfiguration";
export * from "./subconfigurations";
export * from "./TemplateConfiguration";
diff --git a/src/util/config/types/subconfigurations/register/Email.ts b/src/util/config/types/subconfigurations/register/Email.ts
index 478dc97..4f95caf 100644
--- a/src/util/config/types/subconfigurations/register/Email.ts
+++ b/src/util/config/types/subconfigurations/register/Email.ts
@@ -16,7 +16,7 @@
along with this program. If not, see .
*/
-export class EmailConfiguration {
+export class RegistrationEmailConfiguration {
required: boolean = false;
allowlist: boolean = false;
blocklist: boolean = true;