Implement SMTP configuration

This commit is contained in:
Rene Vergara 2023-01-24 13:27:32 -06:00
parent a8e1c1b4d8
commit 1e2784f7db
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2
4 changed files with 24 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"