Skip to content

Commit 2903a3a

Browse files
authored
only validate SMTP_FROM if necessary (#5442)
1 parent 952992c commit 2903a3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> {
942942
}
943943
}
944944

945-
if !is_valid_email(&cfg.smtp_from) {
945+
if (cfg.smtp_host.is_some() || cfg.use_sendmail) && !is_valid_email(&cfg.smtp_from) {
946946
err!(format!("SMTP_FROM '{}' is not a valid email address", cfg.smtp_from))
947947
}
948948

0 commit comments

Comments
 (0)