diff options
author | Joris Guyonvarch | 2025-07-18 23:53:49 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2025-07-18 23:53:49 +0200 |
commit | 9a360f17c62bcc524af503efe95e197ce63f6229 (patch) | |
tree | 137211ba28aaad81e097913aea44967bc6f13dea /src/model | |
parent | bf26a9a7d145590e498e6057db27cee2ad162445 (diff) |
Specify mail from in environmentmain
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/config.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/model/config.rs b/src/model/config.rs index 1fa5bb4..e0267d5 100644 --- a/src/model/config.rs +++ b/src/model/config.rs @@ -6,7 +6,8 @@ use std::str::FromStr; pub struct Config { pub auth_secret: String, pub db_path: String, - pub mock_mails: bool, + pub mails_mock: bool, + pub mails_from: String, pub secure_cookies: bool, pub socket_address: SocketAddr, } @@ -15,7 +16,8 @@ pub fn from_env() -> Result<Config, String> { Ok(Config { auth_secret: read_string("AUTH_SECRET")?, db_path: read_string("DB_PATH")?, - mock_mails: read_bool("MOCK_MAILS")?, + mails_mock: read_bool("MAILS_MOCK")?, + mails_from: read_string("MAILS_FROM")?, secure_cookies: read_bool("SECURE_COOKIES")?, socket_address: read_socket_address("SOCKET_ADDRESS")?, }) |