server: use configured email-from for sending mail
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
parent
62222ed068
commit
e466526137
|
@ -235,6 +235,9 @@ fn send_job_status_mail(
|
||||||
text: &str,
|
text: &str,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
|
|
||||||
|
let (config, _) = crate::config::node::config()?;
|
||||||
|
let from = config.email_from;
|
||||||
|
|
||||||
// Note: OX has serious problems displaying text mails,
|
// Note: OX has serious problems displaying text mails,
|
||||||
// so we include html as well
|
// so we include html as well
|
||||||
let html = format!("<html><body><pre>\n{}\n<pre>", handlebars::html_escape(text));
|
let html = format!("<html><body><pre>\n{}\n<pre>", handlebars::html_escape(text));
|
||||||
|
@ -248,7 +251,7 @@ fn send_job_status_mail(
|
||||||
subject,
|
subject,
|
||||||
Some(text),
|
Some(text),
|
||||||
Some(&html),
|
Some(&html),
|
||||||
None,
|
from.as_deref(),
|
||||||
Some(&author),
|
Some(&author),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue