1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-15 03:55:23 +02:00

Implmented the emailer class everywhere it needs it (just registration and private message notification so far)

git-svn-id: file:///svn/phpbb/trunk@845 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
James Atkinson 2001-08-13 03:16:35 +00:00
parent df3da5934d
commit 282367ea52
4 changed files with 154 additions and 124 deletions

View File

@ -1,6 +1,6 @@
<?php
/***************************************************************************
smtp.php - description
emailer.php - description
-------------------
begin : Sunday Aug. 12, 2001
copyright : (C) 2001 The phpBB Group
@ -37,11 +37,22 @@ class emailer
{
$this->use_smtp = $use_smtp;
$this->tpl_file = NULL;
$this->sddress = NULL;
$this->address = NULL;
$this->msg = "";
$this->mimeOut = "";
}
//
// Resets all the data (address, template file, etc etc to default
//
function reset()
{
$this->tpl_file = "";
$this->address = "";
$this->msg = "";
$this->memOut = "";
}
//
// Sets an email address to send to
//

View File

@ -0,0 +1,8 @@
You are reciving this email because you have recived a private message
on {SITENAME} and you have requested that you be notified on this event.
You can view your new private message by clicking on the following link:
{U_INBOX}
{EMAIL_SIG}

View File

@ -674,7 +674,17 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
{
if($to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']))
{
@mail($to_userdata['user_email'], $lang['Notification_subject'], $email_msg, "From: ".$board_config['board_email_from']."\r\n");
$email_headers = "From: " . $board_config['board_email_from'] . "\r\n";
$emailer->use_template("privmsg_notify");
$emailer->email_address($to_userdata['user_email']);
$emailer->set_subject($lang['Notification_subject']);
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array("SITENAME" => $board_config['sitename'],
"U_INBOX" => "http://".$SERVER_NAME . $PHP_SELF . "?folder=inbox",
"EMAIL_SIG" => $board_config['board_email']));
$emailer->send();
$emailer->reset();
}
}

View File

@ -344,7 +344,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']))
if(!empty($password) && !empty($password_confirm))
{
// The user wants to change their password, isn't that cute..
// Awww, the user wants to change their password, isn't that cute..
if($password != $password_confirm)
{
$error = TRUE;
@ -733,6 +733,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']))
"ACTIVATE_URL" => "http://".$SERVER_NAME."/".$PHP_SELF."?mode=activate&act_key=$act_key",
"EMAIL_SIG" => $board_config['board_email']));
$emailer->send();
$emailer->reset();
}
message_die(GENERAL_MESSAGE, $msg);