diff options
author | Cara Salter <cara@devcara.com> | 2022-07-20 10:31:01 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-07-20 10:31:01 -0400 |
commit | 4b616447715b8129ae322341959e1c2bfabbd10e (patch) | |
tree | 01c23c8a5e29d2821cdd1047d0ec27a69f8b1138 /src/config.rs | |
parent | b98646d8501689072f5624483d258adcbf6fc5c5 (diff) | |
download | nccd-4b616447715b8129ae322341959e1c2bfabbd10e.tar.gz nccd-4b616447715b8129ae322341959e1c2bfabbd10e.zip |
emails
also subnet storage
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 4ceba75..c153085 100644 --- a/src/config.rs +++ b/src/config.rs @@ -9,6 +9,7 @@ use std::str; pub struct Config { pub server: ServerConfig, pub database: DbConfig, + pub email: EmailConfig, } #[derive(Deserialize)] @@ -23,6 +24,18 @@ pub struct DbConfig { pub max_connections: u32, } +#[derive(Deserialize)] +pub struct EmailConfig { + pub smtp_server: String, + pub smtp_port: u16, + pub smtp_tls: bool, + pub smtp_starttls: bool, + pub smtp_username: Option<String>, + pub smtp_password: Option<String>, + pub email_from: String, + pub email_helo: String, +} + impl Config { pub fn init(path: String) -> Result<Config, ServiceError> { if let Ok(c) = fs::read(path) { |