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
Please correct CVS.