From 68fb3c955a93cfd06690dfb9c81de2fc2ffcf9f6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 23 Mar 2013 09:20:16 +0400 Subject: update reset user password to use ttrssMailer --- classes/pref/users.php | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'classes/pref/users.php') diff --git a/classes/pref/users.php b/classes/pref/users.php index b4f043775..51493a273 100644 --- a/classes/pref/users.php +++ b/classes/pref/users.php @@ -295,7 +295,7 @@ class Pref_Users extends Handler_Protected { to %s", $login, $email); } - require_once 'lib/phpmailer/class.phpmailer.php'; + require_once 'classes/ttrssmailer.php'; if ($email) { require_once "lib/MiniTemplator.class.php"; @@ -313,30 +313,11 @@ class Pref_Users extends Handler_Protected { $tpl->generateOutputToString($message); - $mail = new PHPMailer(); + $mail = new ttrssMailer(); - $mail->PluginDir = "lib/phpmailer/"; - $mail->SetLanguage("en", "lib/phpmailer/language/"); - - $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(); + $rc = $mail->quickMail($email, $login, + __("[tt-rss] Password change notification"), + $message, false); if (!$rc) print_error($mail->ErrorInfo); } -- cgit v1.2.3-54-g00ecf