Implement SMTP configuration
This commit is contained in:
parent
a8e1c1b4d8
commit
1e2784f7db
4 changed files with 24 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
4
zgo.cfg
4
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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue