From: moodler Date: Thu, 14 Nov 2002 11:45:14 +0000 (+0000) Subject: Set the character set of email to be the same as the default language X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=98c4eae3ace4979575258672e28ddcbe104c63ac;p=moodle.git Set the character set of email to be the same as the default language --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 21a2cee70b..59457cd12b 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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