diff --git a/CHANGELOG.md b/CHANGELOG.md index a245aa0..e89c3d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- New configuration fields for SMTP + ### Fixed - Owner expiration query diff --git a/src/Config.hs b/src/Config.hs index 1abfcef..41cda45 100644 --- a/src/Config.hs +++ b/src/Config.hs @@ -21,6 +21,10 @@ data Config = , c_useTls :: Bool , c_certificate :: String , c_key :: String + , c_smtpHost :: String + , c_smtpPort :: Int + , c_smtpUser :: String + , c_smtpPwd :: String } deriving (Eq, Show) @@ -39,6 +43,10 @@ loadZGoConfig path = do useTls <- require config "tls" cert <- require config "certificate" key <- require config "key" + mailHost <- require config "smtpHost" + mailPort <- require config "smtpPort" + mailUser <- require config "smtpUser" + mailPwd <- require config "smtpPwd" return $ Config dbHost @@ -53,3 +61,7 @@ loadZGoConfig path = do useTls cert key + mailHost + mailPort + mailUser + mailPwd diff --git a/zgo.cfg b/zgo.cfg index eec2397..aa2bbf8 100644 --- a/zgo.cfg +++ b/zgo.cfg @@ -10,3 +10,7 @@ port = 3000 tls = false certificate = "/path/to/cert.pem" key = "/path/to/key.pem" +mailHost = "127.0.0.1" +mailPort = 1025 +mailUser = "contact@zgo.cash" +mailPwd = "uib3K8BkCPexl_wr5bYfrg" diff --git a/zgotest.cfg b/zgotest.cfg index ca65231..673b5ca 100644 --- a/zgotest.cfg +++ b/zgotest.cfg @@ -10,3 +10,7 @@ port = 3000 tls = false certificate = "/path/to/cert.pem" key = "/path/to/key.pem" +mailHost = "127.0.0.1" +mailPort = 1025 +mailUser = "contact@zgo.cash" +mailPwd = "uib3K8BkCPexl_wr5bYfrg"