mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-16 12:29:43 +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:
parent
df3da5934d
commit
282367ea52
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
smtp.php - description
|
emailer.php - description
|
||||||
-------------------
|
-------------------
|
||||||
begin : Sunday Aug. 12, 2001
|
begin : Sunday Aug. 12, 2001
|
||||||
copyright : (C) 2001 The phpBB Group
|
copyright : (C) 2001 The phpBB Group
|
||||||
@ -37,11 +37,22 @@ class emailer
|
|||||||
{
|
{
|
||||||
$this->use_smtp = $use_smtp;
|
$this->use_smtp = $use_smtp;
|
||||||
$this->tpl_file = NULL;
|
$this->tpl_file = NULL;
|
||||||
$this->sddress = NULL;
|
$this->address = NULL;
|
||||||
$this->msg = "";
|
$this->msg = "";
|
||||||
$this->mimeOut = "";
|
$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
|
// Sets an email address to send to
|
||||||
//
|
//
|
||||||
|
8
phpBB/language/email/privmsg_notify_english.tpl
Executable file
8
phpBB/language/email/privmsg_notify_english.tpl
Executable 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}
|
@ -674,7 +674,17 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
|
|||||||
{
|
{
|
||||||
if($to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']))
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']))
|
|||||||
|
|
||||||
if(!empty($password) && !empty($password_confirm))
|
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)
|
if($password != $password_confirm)
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$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",
|
"ACTIVATE_URL" => "http://".$SERVER_NAME."/".$PHP_SELF."?mode=activate&act_key=$act_key",
|
||||||
"EMAIL_SIG" => $board_config['board_email']));
|
"EMAIL_SIG" => $board_config['board_email']));
|
||||||
$emailer->send();
|
$emailer->send();
|
||||||
|
$emailer->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
message_die(GENERAL_MESSAGE, $msg);
|
message_die(GENERAL_MESSAGE, $msg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user