From c23ff7303256c26aa6303a995be70b14f0e71a00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be>
Date: Mon, 8 Aug 2016 10:12:17 +0200
Subject: [PATCH] Fixes #5050 changing content type to text/plain in mail_utf8

---
 include/functions.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/functions.inc b/include/functions.inc
index 87af4946a..0493dc844 100644
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -3443,7 +3443,7 @@ function ldap_escape_dn($str, $ignore = '')
   return ldap_escape($str, $ignore, LDAP_ESCAPE_DN);
 }
 
-function mail_utf8($to, $from_user, $from_email, $subject, $message)
+function mail_utf8($to, $from_user, $from_email, $subject, $message, $type = 'plain')
 {
   $subject = "=?UTF-8?B?".base64_encode($subject)."?=";
   if ($from_user) {
@@ -3455,7 +3455,7 @@ function mail_utf8($to, $from_user, $from_email, $subject, $message)
     $headers .= "Reply-To: <$from_email>\r\n";
   }
   $headers .= "MIME-Version: 1.0" . "\r\n" .
-              "Content-type: text/html; charset=UTF-8" . "\r\n";
+              "Content-type: text/$type; charset=UTF-8" . "\r\n";
 
   $additional_parameters = "-f".$from_email;
 
-- 
GitLab