mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
update reset user password to use ttrssMailer
This commit is contained in:
+5
-24
@@ -295,7 +295,7 @@ class Pref_Users extends Handler_Protected {
|
|||||||
to <b>%s</b>", $login, $email);
|
to <b>%s</b>", $login, $email);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once 'lib/phpmailer/class.phpmailer.php';
|
require_once 'classes/ttrssmailer.php';
|
||||||
|
|
||||||
if ($email) {
|
if ($email) {
|
||||||
require_once "lib/MiniTemplator.class.php";
|
require_once "lib/MiniTemplator.class.php";
|
||||||
@@ -313,30 +313,11 @@ class Pref_Users extends Handler_Protected {
|
|||||||
|
|
||||||
$tpl->generateOutputToString($message);
|
$tpl->generateOutputToString($message);
|
||||||
|
|
||||||
$mail = new PHPMailer();
|
$mail = new ttrssMailer();
|
||||||
|
|
||||||
$mail->PluginDir = "lib/phpmailer/";
|
$rc = $mail->quickMail($email, $login,
|
||||||
$mail->SetLanguage("en", "lib/phpmailer/language/");
|
__("[tt-rss] Password change notification"),
|
||||||
|
$message, false);
|
||||||
$mail->CharSet = "UTF-8";
|
|
||||||
|
|
||||||
$mail->From = SMTP_FROM_ADDRESS;
|
|
||||||
$mail->FromName = SMTP_FROM_NAME;
|
|
||||||
$mail->AddAddress($email, $login);
|
|
||||||
|
|
||||||
if (SMTP_HOST) {
|
|
||||||
$mail->Host = SMTP_HOST;
|
|
||||||
$mail->Mailer = "smtp";
|
|
||||||
$mail->SMTPAuth = SMTP_LOGIN != '';
|
|
||||||
$mail->Username = SMTP_LOGIN;
|
|
||||||
$mail->Password = SMTP_PASSWORD;
|
|
||||||
}
|
|
||||||
|
|
||||||
$mail->IsHTML(false);
|
|
||||||
$mail->Subject = __("[tt-rss] Password change notification");
|
|
||||||
$mail->Body = $message;
|
|
||||||
|
|
||||||
$rc = $mail->Send();
|
|
||||||
|
|
||||||
if (!$rc) print_error($mail->ErrorInfo);
|
if (!$rc) print_error($mail->ErrorInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class ttrssMailer extends PHPMailer {
|
|||||||
$this->addAddress($toAddress, $toName);
|
$this->addAddress($toAddress, $toName);
|
||||||
$this->Subject = $subject;
|
$this->Subject = $subject;
|
||||||
$this->Body = $body;
|
$this->Body = $body;
|
||||||
|
$this->IsHTML($altbody != '');
|
||||||
$rc=$this->send();
|
$rc=$this->send();
|
||||||
return $rc;
|
return $rc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user