phpBBの改造

メールの文字化けを直す

  • language/lang_japanese/mail/内のファイルの文字コードを表示させたい文字コードにする
  • language/lang_japanese/lang_main.phpを修正<code php>$lang['ENCODING'] = 'UTF-8';

$lang['MAIL_ENCODING'] = “iso-2022-jp”;</code>

  • includes/emailer.phpを修正 (1)

    $result = @mail($to, $this->subject, preg_replace

    という行の前に<code php>$this→msg = mb_convert_encoding($this→msg,'JIS','UTF-8');

$this→subject = mb_convert_encoding($this→subject,'JIS','UTF-8'); $this→subject = mb_encode_mimeheader($this→subject,'ISO-2022-JP');</code>を挿入

  • includes/emailer.phpを修正 (2)

    $lang['ENCODING']

    となっている部分を

    $lang['MAIL_ENCODING']

    に置換する