From 4b616447715b8129ae322341959e1c2bfabbd10e Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Wed, 20 Jul 2022 10:31:01 -0400 Subject: emails also subnet storage --- src/config.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/config.rs') 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, + pub smtp_password: Option, + pub email_from: String, + pub email_helo: String, +} + impl Config { pub fn init(path: String) -> Result { if let Ok(c) = fs::read(path) { -- cgit v1.2.3