From d2f2d1092903aa09e5695857613c5d61e55f8d4f Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Fri, 5 Oct 2001 14:13:58 +0000 Subject: [PATCH] Moved emailer instantiation out of loop, was causing failures during topic reply notifications git-svn-id: file:///svn/phpbb/trunk@1128 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index a995bd7b25..ddc3154b35 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -747,22 +747,21 @@ if( ( $submit || $confirm ) && !$error ) $email_set = $db->sql_fetchrowset($result); $update_watched_sql = ""; + include($phpbb_root_path . 'includes/emailer.'.$phpEx); + $emailer = new emailer($board_config['smtp_delivery']); + + $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; + $path = (dirname($HTTP_SERVER_VARS['REQUEST_URI']) == "/") ? "" : dirname($HTTP_SERVER_VARS['REQUEST_URI']); + for($i = 0; $i < count($email_set); $i++) { if( $email_set[$i]['user_email'] != "") { - include($phpbb_root_path . 'includes/emailer.'.$phpEx); - $emailer = new emailer($board_config['smtp_delivery']); - - $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; - $emailer->use_template("topic_notify"); $emailer->email_address($email_set[$i]['user_email']); $emailer->set_subject($lang['Topic_reply_notification']); $emailer->extra_headers($email_headers); - $path = (dirname($HTTP_SERVER_VARS['REQUEST_URI']) == "/") ? "" : dirname($HTTP_SERVER_VARS['REQUEST_URI']); - $emailer->assign_vars(array( "EMAIL_SIG" => str_replace("
", "\n", "-- \n" . $board_config['board_email_sig']), "USERNAME" => $email_set[$i]['username'],