Nieuw lid |
|
Ik gebruik een automatisch mailformulier vanuit mijn phpBB2 forum, dit formulier wordt zowel naar mijn gewone mailclient als naar een mailticketsysteem gestuurd. (OSticket)
Wanneer iemand in het comment-veld van het formulier bv.: 't wordt goed weer schrijft, blokkeert het mailticketsysteem en wordt de body van het bericht niet geparsed en krijg ik enkel de headers binnen.
In de gewone mailclient komt het bericht binnen als 't wordt goed weer. Ik vermoed dat de oplossing van het probleem in die 't te zoeken moet zijn.
Dit is de code die vanuit phpBB2 de mail verstuurt:
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($userdata['user_email']);
$emailer->replyto($userdata['user_email']);
/*
foreach($moderators as $email)
{
$emailer->bcc($email);
}
*/
$emailer->use_template('report_post');
$emailer->email_address('abuse@XXXXXX.be');
$emailer->set_subject($lang['Report_post'] . ' - ' . $topic_title);
$email_headers = 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n";
$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";
$emailer->extra_headers($email_headers);
$script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/viewtopic.'.$phpEx : 'viewtopic.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
$server_url = $server_protocol . $server_name . $server_port . $script_name;
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'USERNAME' => $userdata['username'],
'POST_ID' => $post_id,
'TOPIC_TITLE' => $topic_title,
'COMMENTS' => $comments,
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
'U_VIEW_POST' => urldecode($server_url . '?' . POST_POST_URL . '=' . $post_id . '#' . $post_id))
);
$emailer->send();
$emailer->reset();
return;
}
include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); $emailer->from($userdata['user_email']); $emailer->replyto($userdata['user_email']); /* foreach($moderators as $email) { $emailer->bcc($email); } */ $emailer->use_template('report_post'); $emailer->email_address('abuse@XXXXXX.be'); $emailer->set_subject($lang['Report_post'] . ' - ' . $topic_title); $email_headers = 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n"; $email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n"; $email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n"; $email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n"; $emailer->extra_headers($email_headers); $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])); $script_name = ( $script_name != '' ) ? $script_name . '/viewtopic.'.$phpEx : 'viewtopic.'.$phpEx; $server_name = trim($board_config['server_name']); $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; $server_url = $server_protocol . $server_name . $server_port . $script_name; $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'USERNAME' => $userdata['username'], 'POST_ID' => $post_id, 'TOPIC_TITLE' => $topic_title, 'COMMENTS' => $comments, 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_VIEW_POST' => urldecode($server_url . '?' . POST_POST_URL . '=' . $post_id . '#' . $post_id)) ); $emailer->send(); $emailer->reset(); return; }
Kan ik die 't op één of andere manier vermijden bij het versturen van dat formulier? Ik heb al geprobeerd met striplashes maar niets lijkt te werken.
php.ini vertoont deze instellingen:
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On
;magic_quotes_gpc = Off
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
; Magic quotes for incoming GET/POST/Cookie data. magic_quotes_gpc = On ;magic_quotes_gpc = Off ; Magic quotes for runtime -generated data , e .g . data from SQL , from exec(), etc . ; Use Sybase-style magic quotes (escape ' with '' instead of \'). magic_quotes_sybase = Off
Als ik op weg kan gezet worden door iemand, heel graag. Ik kan niet progammeren in php maar leer vrij snel. ;)
Bedankt,
Nic
|