mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-23 08:18:09 +03:00
only validate SMTP_FROM if necessary (#5442)
This commit is contained in:
1 parent
952992c85b
commit
2903a3a13a
1 file changed
+1
-1
+1
-1
@@ -942,7 +942,7 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> {
|
||||
}
|
||||
}
|
||||
|
||||
if !is_valid_email(&cfg.smtp_from) {
|
||||
if (cfg.smtp_host.is_some() || cfg.use_sendmail) && !is_valid_email(&cfg.smtp_from) {
|
||||
err!(format!("SMTP_FROM '{}' is not a valid email address", cfg.smtp_from))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user