From 98c4eae3ace4979575258672e28ddcbe104c63ac Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 14 Nov 2002 11:45:14 +0000 Subject: [PATCH] Set the character set of email to be the same as the default language --- lib/moodlelib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 21a2cee70beda..59457cd12bd3f 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