mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
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
This commit is contained in:
parent
5692f347e5
commit
d2f2d10929
1 changed files with 6 additions and 7 deletions
|
@ -747,22 +747,21 @@ if( ( $submit || $confirm ) && !$error )
|
||||||
$email_set = $db->sql_fetchrowset($result);
|
$email_set = $db->sql_fetchrowset($result);
|
||||||
$update_watched_sql = "";
|
$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++)
|
for($i = 0; $i < count($email_set); $i++)
|
||||||
{
|
{
|
||||||
if( $email_set[$i]['user_email'] != "")
|
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->use_template("topic_notify");
|
||||||
$emailer->email_address($email_set[$i]['user_email']);
|
$emailer->email_address($email_set[$i]['user_email']);
|
||||||
$emailer->set_subject($lang['Topic_reply_notification']);
|
$emailer->set_subject($lang['Topic_reply_notification']);
|
||||||
$emailer->extra_headers($email_headers);
|
$emailer->extra_headers($email_headers);
|
||||||
|
|
||||||
$path = (dirname($HTTP_SERVER_VARS['REQUEST_URI']) == "/") ? "" : dirname($HTTP_SERVER_VARS['REQUEST_URI']);
|
|
||||||
|
|
||||||
$emailer->assign_vars(array(
|
$emailer->assign_vars(array(
|
||||||
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
|
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
|
||||||
"USERNAME" => $email_set[$i]['username'],
|
"USERNAME" => $email_set[$i]['username'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue