]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
simplify default global config, expand sanity_check messages
[tt-rss.git] / include / functions.php
index 2118858cac0bdbf756067b1d646fc10fe881e5cd..ec31a1f165537f5759ba0ad73dbcf3a388711d30 100644 (file)
 
                require_once 'lib/phpmailer/class.phpmailer.php';
 
-               if (!DIGEST_ENABLE) return false;
-
-               $user_limit = DIGEST_EMAIL_LIMIT;
+               $user_limit = 15; // amount of users to process (e.g. emails to send out)
                $days = 1;
 
                print "Sending digests, batch of max $user_limit users, days = $days, headline limit = $limit\n\n";
 
                                        $mail->CharSet = "UTF-8";
 
-                                       $mail->From = DIGEST_FROM_ADDRESS;
-                                       $mail->FromName = DIGEST_FROM_NAME;
+                                       $mail->From = SMTP_FROM_ADDRESS;
+                                       $mail->FromName = SMTP_FROM_NAME;
                                        $mail->AddAddress($line["email"], $line["login"]);
 
-                                       if (DIGEST_SMTP_HOST) {
-                                               $mail->Host = DIGEST_SMTP_HOST;
+                                       if (SMTP_HOST) {
+                                               $mail->Host = SMTP_HOST;
                                                $mail->Mailer = "smtp";
-                                               $mail->SMTPAuth = DIGEST_SMTP_LOGIN != '';
-                                               $mail->Username = DIGEST_SMTP_LOGIN;
-                                               $mail->Password = DIGEST_SMTP_PASSWORD;
+                                               $mail->SMTPAuth = SMTP_LOGIN != '';
+                                               $mail->Username = SMTP_LOGIN;
+                                               $mail->Password = SMTP_PASSWORD;
                                        }
 
                                        $mail->IsHTML(true);
                                                onclick=\"editArticleNote($id)\"
                                                alt='PubNote' title='".__('Edit article note')."'>";
 
-                               if (DIGEST_ENABLE) {
-                                       $rv['content'] .= "<img src=\"".theme_image($link, 'images/art-email.png')."\"
-                                               class='tagsPic' style=\"cursor : pointer\"
-                                               onclick=\"emailArticle($id)\"
-                                               alt='Zoom' title='".__('Forward by email')."'>";
-                               }
+                               $rv['content'] .= "<img src=\"".theme_image($link, 'images/art-email.png')."\"
+                                       class='tagsPic' style=\"cursor : pointer\"
+                                       onclick=\"emailArticle($id)\"
+                                       alt='Zoom' title='".__('Forward by email')."'>";
 
                                if (ENABLE_TWEET_BUTTON) {
                                        $rv['content'] .= "<img src=\"".theme_image($link, 'images/art-tweet.png')."\"