diff options
author | Andrew Dolgov <[email protected]> | 2013-03-22 22:09:34 -0700 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-22 22:09:34 -0700 |
commit | 6ef8ec84cb66b053edf84e8738a04089f8ca1b07 (patch) | |
tree | 893ba2dd3d5cb00e733f0293563da444d86fa9db /include/digest.php | |
parent | 0d6ecb1f1cc663497bdd8fccb3f2dc66d2cdb0b9 (diff) | |
parent | 1b2afd2bd3dc19cdd36da47cc52040a83cdb3b68 (diff) |
Merge pull request #73 from derekmurawsky/dmChanges
Centralized mail handling per post on google + community.
Diffstat (limited to 'include/digest.php')
-rw-r--r-- | include/digest.php | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/include/digest.php b/include/digest.php index 93ce373a2..ab29d9432 100644 --- a/include/digest.php +++ b/include/digest.php @@ -8,7 +8,7 @@ */ function send_headlines_digests($link, $debug = false) { - require_once 'lib/phpmailer/class.phpmailer.php'; + require_once 'classes/ttrssmailer.php'; $user_limit = 15; // amount of users to process (e.g. emails to send out) $limit = 1000; // maximum amount of headlines to include @@ -50,31 +50,9 @@ if ($headlines_count > 0) { - $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($line["email"], $line["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(true); - $mail->Subject = DIGEST_SUBJECT; - $mail->Body = $digest; - $mail->AltBody = $digest_text; - - $rc = $mail->Send(); + $rc = $mail->quickMail($line["email"], $line["login"] , DIGEST_SUBJECT, $digest, $digest_text); if (!$rc && $debug) print "ERROR: " . $mail->ErrorInfo; |