0
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden synced 2024-11-12 04:52:47 +01:00

Fixed small buggy in validation

This commit is contained in:
BlackDex 2021-02-03 23:47:48 +01:00
parent d41350050b
commit e794b397d3

View file

@ -557,7 +557,7 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> {
err!("Both `SMTP_HOST` and `SMTP_FROM` need to be set for email support")
}
if !cfg.smtp_from.contains('@') {
if cfg.smtp_host.is_some() && !cfg.smtp_from.contains('@') {
err!("SMTP_FROM does not contain a mandatory @ sign")
}