mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01: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
@ -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("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
|
||||
"USERNAME" => $email_set[$i]['username'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user