WIP
This commit is contained in:
parent
5388e7cb7b
commit
f7175d685f
2 changed files with 4 additions and 0 deletions
|
@ -375,6 +375,7 @@ fn create_new_server_config(
|
|||
let email = match meta.email.as_ref() {
|
||||
Some(address) => Some(server::Email {
|
||||
enabled: meta.enable_email,
|
||||
require_for_signup: meta.email_required_for_signup,
|
||||
address: address.to_owned(),
|
||||
host: meta
|
||||
.smtp_host
|
||||
|
@ -387,6 +388,7 @@ fn create_new_server_config(
|
|||
.map_err(|_| Error::InvalidConfig("SMTP port is out of range"))?,
|
||||
user: meta.smtp_user.to_owned(),
|
||||
password: meta.smtp_pass.to_owned(),
|
||||
use_implicit_ssl: meta.smtp_secure,
|
||||
}),
|
||||
None => None,
|
||||
};
|
||||
|
|
|
@ -60,12 +60,14 @@ pub struct Listen {
|
|||
#[derive(Deserialize, Serialize, Validate, Debug, Clone)]
|
||||
pub struct Email {
|
||||
pub enabled: bool,
|
||||
pub require_for_signup: bool,
|
||||
#[validate(email)]
|
||||
pub address: String,
|
||||
pub host: String,
|
||||
pub port: u16,
|
||||
pub user: Option<String>,
|
||||
pub password: Option<String>,
|
||||
pub use_implicit_ssl: bool,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Validate, Debug, Clone)]
|
||||
|
|
Loading…
Reference in a new issue