1
0
Fork 0

Merge pull request #1356 from BlackDex/fix-config-bug

Fixed small buggy in validation
Dieser Commit ist enthalten in:
Daniel García 2021-02-03 23:50:49 +01:00 committet von GitHub
Commit 46d31ee5f7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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")
}