]> git.mjollnir.org Git - moodle.git/commitdiff
Set the character set of email to be the same as the default language
authormoodler <moodler>
Thu, 14 Nov 2002 11:45:14 +0000 (11:45 +0000)
committermoodler <moodler>
Thu, 14 Nov 2002 11:45:14 +0000 (11:45 +0000)
lib/moodlelib.php

index 21a2cee70bedadda0bc6d9bdb392dbf8425abdec..59457cd12bd3fc458b7dd885437843f2478d8cfa 100644 (file)
@@ -1577,6 +1577,11 @@ 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)
 
+
+    if ($CFG->lang != "en") {
+        $mail->Charset = get_string("thischarset");
+    }
+
     if ($CFG->smtphosts) {
         $mail->IsSMTP();                               // use SMTP directly
         $mail->Host = "$CFG->smtphosts";               // specify main and backup servers