From 56a2b987e61614892aa80108c250b79237f5f4f8 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 19 Mar 2006 02:35:50 +0000 Subject: [PATCH] Starting NOW we are using our own encode_mimeheader() function to generate all Moodle emails. Only applied if we are running under $CFG->unicodedb. Tested with postfix and sendmail servers and Thunderbird, Mail and Entourage mail clients... Test, test, test....! --- lib/phpmailer/class.phpmailer.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/phpmailer/class.phpmailer.php b/lib/phpmailer/class.phpmailer.php index 2a9b1b1806..0752dbd81f 100644 --- a/lib/phpmailer/class.phpmailer.php +++ b/lib/phpmailer/class.phpmailer.php @@ -1151,6 +1151,15 @@ class PHPMailer * @return string */ function EncodeHeader ($str, $position = 'text') { + + /// Start Moodle Hack - if we are running under unicodedb, we'll try our own + /// encode_header code that's multibyte-safe + global $CFG; + if ($CFG->unicodedb) { + $textlib = textlib_get_instance(); + return $textlib->encode_mimeheader($str, $this->CharSet); + } + /// End Moodle Hack $x = 0; switch (strtolower($position)) { -- 2.39.5