diff options
| author | Bobby <[email protected]> | 2025-06-15 00:56:57 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-06-15 00:56:57 +0530 |
| commit | 5e665642bf30a9902d191cec86a33fd3b878359a (patch) | |
| tree | 46eec60472a9f8c894e1e7ed2fd19aa2bed09fdd /config | |
| parent | f1085e328bc3229e22c15c5685411649587c2832 (diff) | |
| download | imageboard-5e665642bf30a9902d191cec86a33fd3b878359a.tar.xz imageboard-5e665642bf30a9902d191cec86a33fd3b878359a.zip | |
added smtp config
Diffstat (limited to 'config')
| -rw-r--r-- | config/config.go | 5 | ||||
| -rw-r--r-- | config/types.go | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index 14c0bf2..ce2dd8b 100644 --- a/config/config.go +++ b/config/config.go @@ -14,6 +14,7 @@ var ( S3 S3Config
Server ServerConfig
Session SessionConfig
+ SMTP SMTPConfig
)
func init() {
@@ -44,4 +45,8 @@ func init() { if err := Parse(&Session); err != nil {
log.Fatalf("failed to parse configuration: %v", err)
}
+
+ if err := Parse(&SMTP); err != nil {
+ log.Fatalf("failed to parse configuration: %v", err)
+ }
}
diff --git a/config/types.go b/config/types.go index 34981c9..075b728 100644 --- a/config/types.go +++ b/config/types.go @@ -41,3 +41,11 @@ type S3Config struct { UseSSL bool `env:"S3_USE_SSL" default:"false"`
PublicURL string `env:"S3_PUBLIC_URL" default:""`
}
+
+type SMTPConfig struct {
+ Host string `env:"SMTP_HOST" default:""`
+ Port int `env:"SMTP_PORT" default:"587"`
+ Username string `env:"SMTP_USERNAME" default:""`
+ Password string `env:"SMTP_PASSWORD" default:""`
+ From string `env:"EMAIL_FROM" default:""`
+}
|
