From 982c55738f9c1436c23259bc646ece002ac61d66 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Thu, 13 Oct 2011 14:37:36 +0000 Subject: [PATCH] Allow to override some default headers when sending an email SVN:trunk[1632] --- core/email.class.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/email.class.inc.php b/core/email.class.inc.php index 372cd5cb8..ac7650a78 100644 --- a/core/email.class.inc.php +++ b/core/email.class.inc.php @@ -73,8 +73,14 @@ class EMail { $sHeaders = 'MIME-Version: 1.0' . "\r\n"; // ! the case is important for MS-Outlook - $sHeaders .= 'Content-Type: text/html; charset=UTF-8' . "\r\n"; - $sHeaders .= 'Content-Transfer-Encoding: 8bit' . "\r\n"; + if (!array_key_exists('Content-Type', $this->m_aHeaders)) + { + $sHeaders .= 'Content-Type: text/html; charset=UTF-8' . "\r\n"; + } + if (!array_key_exists('Content-Transfer-Encoding', $this->m_aHeaders)) + { + $sHeaders .= 'Content-Transfer-Encoding: 8bit' . "\r\n"; + } foreach ($this->m_aHeaders as $sKey => $sValue) { $sHeaders .= "$sKey: $sValue\r\n";