MDL-5229 and MDL-6196 adding gb18030 mime header encoding; merged from MOODLE_18_STABLE

This commit is contained in:
skodak
2007-03-12 08:41:28 +00:00
parent a974c79932
commit 531468274f
5 changed files with 45 additions and 7 deletions
+1 -3
View File
@@ -3296,7 +3296,7 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a
$mail->Version = 'Moodle '. $CFG->version; // mailer version
$mail->PluginDir = $CFG->libdir .'/phpmailer/'; // plugin directory (eg smtp plugin)
$mail->CharSet = 'utf-8';
$mail->CharSet = 'UTF-8';
if ($CFG->smtphosts == 'qmail') {
$mail->IsQmail(); // use Qmail system
@@ -3403,10 +3403,8 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a
}
}
/// If it has changed, convert all the necessary strings
$charset = strtolower($charset);
$charsets = get_list_of_charsets();
unset($charsets['UTF-8']);
$charsets = array_map('strtolower', $charsets);
if (in_array($charset, $charsets)) {
/// Save the new mail charset
$mail->CharSet = $charset;