From 31e4ea2ba0ab7c02a4f0e2285cc27b7648a1db89 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 26 Oct 2016 13:33:46 +0200 Subject: [PATCH] Revert "Determine eMail's Content-Type "text/html" if message has "<" and ">" at the beginning and the end." This reverts commit a85b5aed39888ff21083df46e5af5d8c8f3c80c7. --- pandora_server/lib/PandoraFMS/Core.pm | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 49b0dbf366..47b8e324ac 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1067,25 +1067,13 @@ sub pandora_execute_action ($$$$$$$$$;$) { }; # Default content type - my $content_type; - - # Check if message looks like html. - # Assume that html message starts with "<" and ends with ">". - if ($field3 =~ /^\s*<.*>\s*$/s ) { - $content_type = 'text/html;'; - } - else { - $content_type = 'text/plain;'; - } + my $content_type = 'text/html; charset="iso-8859-1"'; # Check if message has non-ascii chars. # non-ascii chars should be encoded in UTF-8. if ($field3 =~ /[^[:ascii:]]/o) { $field3 = encode("UTF-8", $field3); - $content_type .= ' charset="UTF-8"'; - } - else { - $content_type .= ' charset="iso-8859-1"'; + $content_type = 'text/plain; charset="UTF-8"'; } # Build the mail with attached content