diff --git a/data/config.example.json b/data/config.example.json index 35ecc0e..03e3a8c 100644 --- a/data/config.example.json +++ b/data/config.example.json @@ -14,5 +14,12 @@ "server_config": { "port": 8080, "base_url": "https://profile.example.com" + }, + "email_config": { + "username": "noreply", + "email": "noreply@example.com", + "password": "", + "smtp_url": "mx.example.com", + "smtp_port": 587 } } diff --git a/src/main/config.go b/src/main/config.go index e4501e4..6c03db5 100644 --- a/src/main/config.go +++ b/src/main/config.go @@ -26,10 +26,19 @@ type WebserverConfig struct { BaseURL string `json:"base_url"` } +type EmailConfig struct { + Username string `json:"username"` + Email string `json:"email"` + Password string `json:"password"` + SMTPURL string `json:"smtp_url"` + SMTPPort int `json:"smtp_port"` +} + type ServerConfig struct { LDAPConfig LDAPConfig `json:"ldap_config"` StyleConfig StyleConfig `json:"style_config"` WebserverConfig WebserverConfig `json:"server_config"` + EmailConfig EmailConfig `json:"email_config"` } func loadServerConfig(path string) (*ServerConfig, error) {