Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-10384

Recipient names become always "Array" in message feature.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.1
    • 1.8.9, 1.9.5
    • Messages
    • None
    • Multi-bytes character-set environment.

    Description

      function email_to_user() in lib/moodlelib.php

      for example, followings are header of received email.
      --------------------------
      (OK) To: ??? ??? <shirai.shirai@nifty.com>
      (NG) To: Array <shirai.shirai@nifty.com>
      --------------------------

      foreach ($mail->ReplyTo as $key => $rt) { //ReplyTo Names
      // $mail->ReplyTo[$key][1] = $textlib->convert($rt, 'utf-8', $mail->CharSet); : original
      $mail->ReplyTo[$key][1] = $textlib->convert($rt[1], 'utf-8', $mail->CharSet); : modified by shirai
      }
      $mail->Subject = $textlib->convert($mail->Subject, 'utf-8', $mail->CharSet); //Subject
      foreach ($mail->to as $key => $to) {
      // $mail->to[$key][1] = $textlib->convert($to, 'utf-8', $mail->CharSet); //To Names : original
      $mail->to[$key][1] = $textlib->convert($to[1], 'utf-8', $mail->CharSet); //To Names : modified by shirai
      }
      ------------------------------
      need to change convert($rt, ...) to convert($rt[1], ...) , convert($to, ...) to convert($to[1], ...).
      since $rt and $to are array. $to[0] is email address, $to[1] is full name of recipient

      Attachments

        Activity

          People

            poltawski Dan Poltawski
            shirai Tatsuya Shirai
            Petr Skoda Petr Skoda
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13/May/09