1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-05-13 07:03:58 +00:00

Merge branch 'master' into admin-interface

This commit is contained in:
Mathijs van Veluw 2021-02-03 22:22:33 +01:00 committed by GitHub
commit 9e5fd2d576
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 566 additions and 283 deletions

View file

@ -557,6 +557,10 @@ 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('@') {
err!("SMTP_FROM does not contain a mandatory @ sign")
}
if cfg.smtp_username.is_some() != cfg.smtp_password.is_some() {
err!("Both `SMTP_USERNAME` and `SMTP_PASSWORD` need to be set to enable email authentication")
}