From e466526137fb47d7b318ec717b0ce84fd79752c2 Mon Sep 17 00:00:00 2001 From: Hannes Laimer Date: Mon, 3 Jan 2022 10:04:55 +0100 Subject: [PATCH] server: use configured email-from for sending mail Signed-off-by: Hannes Laimer --- src/server/email_notifications.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/email_notifications.rs b/src/server/email_notifications.rs index 33b106b4..4d734368 100644 --- a/src/server/email_notifications.rs +++ b/src/server/email_notifications.rs @@ -235,6 +235,9 @@ fn send_job_status_mail( text: &str, ) -> Result<(), Error> { + let (config, _) = crate::config::node::config()?; + let from = config.email_from; + // Note: OX has serious problems displaying text mails, // so we include html as well let html = format!("
\n{}\n
", handlebars::html_escape(text));
@@ -248,7 +251,7 @@ fn send_job_status_mail(
         subject,
         Some(text),
         Some(&html),
-        None,
+        from.as_deref(),
         Some(&author),
     )?;