]> git.mjollnir.org Git - moodle.git/commitdiff
Some fixes for confirmation emails on sites with long names
authormoodler <moodler>
Thu, 13 May 2004 03:09:47 +0000 (03:09 +0000)
committermoodler <moodler>
Thu, 13 May 2004 03:09:47 +0000 (03:09 +0000)
   - include a HTML version of the email

   - wrap all text emails at 79 characters now, not 70
     I think quoting of text based emails on 80-character terminals
     would be pretty rare these days

lib/moodlelib.php

index 5fafa85170fd584cf56c5f31f6e40dba0870fdcb..e9862593b754160a69e675537e5c5cd27d8e8013 100644 (file)
@@ -1281,7 +1281,7 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml="", $a
 
     $mail->AddAddress("$user->email", fullname($user) );
 
-    $mail->WordWrap = 70;                               // set word wrap
+    $mail->WordWrap = 79;                               // set word wrap
 
     if (!empty($from->precedence)) {
         $mail->Precedence = $from->precedence;          // set precedence level eg "bulk" "list" or "junk"
@@ -1361,7 +1361,9 @@ function send_confirmation_email($user) {
     $message = get_string("emailconfirmation", "", $data);
     $subject = get_string("emailconfirmationsubject", "", $site->fullname);
 
-    return email_to_user($user, $from, $subject, $message);
+    $messagehtml = text_to_html($message, false, false, true);
+
+    return email_to_user($user, $from, $subject, $message, $messagehtml);
 
 }