[pbs-devel] [PATCH proxmox-backup] email_notifications: make html template more valid

Stefan Sterz s.sterz at proxmox.com
Tue Nov 29 17:40:19 CET 2022


some webmail interfaces may behave unexpectedly if the html is
invalid. thus, close tags and declare a language.

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
 src/server/email_notifications.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/server/email_notifications.rs b/src/server/email_notifications.rs
index b3298cf9..378e805e 100644
--- a/src/server/email_notifications.rs
+++ b/src/server/email_notifications.rs
@@ -294,7 +294,7 @@ fn send_job_status_mail(email: &str, subject: &str, text: &str) -> Result<(), Er
     // Note: OX has serious problems displaying text mails,
     // so we include html as well
     let html = format!(
-        "<html><body><pre>\n{}\n<pre>",
+        "<html lang=\"en\"><head></head><body><pre>\n{}\n</pre></body></html>",
         handlebars::html_escape(text)
     );
 
-- 
2.30.2






More information about the pbs-devel mailing list