在某些主機中安裝 Drupal 6 ,安裝和使用沒有問題,但當自行註冊一個測試帳戶後就出現一個錯誤訊息: includes/mail.inc on line 193 ,而且不能發出註冊電郵,這個問題可大了,因為不能發出註冊電郵,也代表用戶不能註冊,找了一個需要修改的解決方法。
開啟 /includes/mail.inc 並按下列修改即可。
$message['to'],
mime_header_encode($message['subject']), //這行不要
str_replace("\n", ' ', mime_header_encode($message['subject'])), //加入這行
// Note: e-mail uses CRLF for line-endings, but PHP's API requires LF.
// They will appear correctly in the actual e-mail that is sent.
str_replace("\r", '', $message['body']),
// For headers, PHP's API suggests that we use CRLF normally,
// but some MTAs incorrecly replace LF with CRLF. See #234403.
join("\n", $mimeheaders)
雖然不建議修改 Drupal 源代碼,因為當在將來升級時如再出現同樣問題,可能又需要再次修改,不過現時還未找到其他方法,唯有暫時使用這個方法。
2009年9月29日星期二
訂閱:
發佈留言 (Atom)
0 留言:
發佈留言