[pve-devel] [PATCH manager 2/5] vzdump: sendmail: fix html by closing the tags

Fabian Ebner f.ebner at proxmox.com
Mon Dec 21 14:48:17 CET 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/VZDump.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index f75e4b16..3b864514 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -394,13 +394,15 @@ sub sendmail {
     }
     $html_log_part .= escape_html($detail_post) if defined($detail_post);
     $html_log_part .= "</pre>";
-    my $html_end .= "\n</body></html>\n";
+    my $html_end = "\n</body></html>\n";
     # end html part
 
     if (length($text) + length($text_log_part) +
-	length($html) + length($html_log_part) < MAX_MAIL_SIZE)
+	length($html) + length($html_log_part) +
+	length($html_end) < MAX_MAIL_SIZE)
     {
 	$html .= $html_log_part;
+	$html .= $html_end;
 	$text .= $text_log_part;
     } else {
 	my $msg = "Log output was too long to be sent by mail. ".
-- 
2.20.1






More information about the pve-devel mailing list