Index: functions.php =================================================================== RCS file: /cvsroot/usebb/UseBB/sources/functions.php,v retrieving revision 1.341 diff -r1.341 functions.php 1085a1086,1092 > } else { > if ( strtolower($charset) == 'utf-8') { > > $subject = '=?'.$charset.'?B?'.base64_encode($subject).'?='; > $from_name = '=?'.$charset.'?B?'.base64_encode($from_name).'?='; > > } 1109,1113c1116,1121 < if ( $is_mbstring && function_exists('mb_send_mail')) { < < if ( !mb_send_mail($to, $subject, $body, join($cr, $headers)) ) < trigger_error('Unable to send e-mail!', E_USER_ERROR); < --- > $is_safe_mode = in_array(strtolower(ini_get("safe_mode")), array('1', 'on')); > > if ( $is_mbstring && function_exists('mb_send_mail') ) { > > $mail_func = 'mb_send_mail'; > 1115a1124 > $mail_func = 'mail'; 1117,1121c1126,1127 < if ( strtolower($charset) == 'utf-8' ) < $headers[] = 'Content-Transfer-Encoding: 8bit'; < < if ( !mail($to, $subject, $body, join($cr, $headers)) ) < trigger_error('Unable to send e-mail!', E_USER_ERROR); --- > $headers[] = 'Content-Type: text/plain; charset='.$charset; > $headers[] = 'Content-Transfer-Encoding: 8bit'; 1123a1130,1137 > > if ( $is_safe_mode ) > $mail_result = $mail_func($to, $subject, $body, join($cr, $headers) ); > else > $mail_result = $mail_func($to, $subject, $body, join($cr, $headers),'-f'.$from_email); > > if ( !$mail_result ) > trigger_error('Unable to send e-mail!', E_USER_ERROR);