commit 46d31ee5f789b6624feca1c24fd05747ad248873
parent d41350050b4b0ed231694d9b6860ad936929dfb8
Author: Daniel GarcĂa <dani-garcia@users.noreply.github.com>
Date: Wed, 3 Feb 2021 23:50:49 +0100
Merge pull request #1356 from BlackDex/fix-config-bug
Fixed small buggy in validation
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/config.rs b/src/config.rs
@@ -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")
}