Browse Source

only validate SMTP_FROM if necessary

pull/5442/head
Stefan Melmuk 3 months ago
parent
commit
fe3aff4852
No known key found for this signature in database GPG Key ID: 817020C608FE9C09
  1. 2
      src/config.rs

2
src/config.rs

@ -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)) err!(format!("SMTP_FROM '{}' is not a valid email address", cfg.smtp_from))
} }

Loading…
Cancel
Save