]> git.proxmox.com Git - proxmox-backup.git/commitdiff
server: use configured email-from for sending mail
authorHannes Laimer <h.laimer@proxmox.com>
Mon, 3 Jan 2022 09:04:55 +0000 (10:04 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 4 Jan 2022 07:09:27 +0000 (08:09 +0100)
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
src/server/email_notifications.rs

index 33b106b487d1cdda06845fbb3941ea3ced7094dc..4d734368c486a20b5146e6aacf8a9673a6f82a12 100644 (file)
@@ -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!("<html><body><pre>\n{}\n<pre>", handlebars::html_escape(text));
@@ -248,7 +251,7 @@ fn send_job_status_mail(
         subject,
         Some(text),
         Some(&html),
-        None,
+        from.as_deref(),
         Some(&author),
     )?;