]> git.mjollnir.org Git - moodle.git/commitdiff
Starting NOW we are using our own encode_mimeheader() function to
authorstronk7 <stronk7>
Sun, 19 Mar 2006 02:35:50 +0000 (02:35 +0000)
committerstronk7 <stronk7>
Sun, 19 Mar 2006 02:35:50 +0000 (02:35 +0000)
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

index 2a9b1b1806ee0a56f9b1df6371c1b8c6b909b5a6..0752dbd81f9d4d1805a7bed7b350a869136275ea 100644 (file)
@@ -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)) {