diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 9c1cfefb298..bb653b02fd7 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -3067,6 +3067,10 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a } } + if (!empty($from->priority)) { + $mail->Priority = $from->priority; + } + if ($messagehtml && $user->mailformat == 1) { // Don't ever send HTML to users who don't want it $mail->IsHTML(true); $mail->Encoding = 'quoted-printable'; // Encoding to use