Torrent subscription Issue.

  • 0 Replies
  • 117 Views
*

Offline colors

  • **
  • 4
  • +0/-0
Torrent subscription Issue.
« on: November 22, 2018, 01:39:14 pm »
I had a problem that Torrents Subscription is not working properly. Only the owner of the site is getting email after uploading a torrent. There are few other users also subscribed categories to get email. But, none of them receiving emails. I believe, there is small bug with below code. Kindly have a look and correction please.

Quote
// send email to subscriptors
         $subscriptors=get_result("SELECT email, subscription FROM {$TABLE_PREFIX}users WHERE subscription IS NOT NULL",true);
         if (count($subscriptors)>0)
          {
           $bcc=array();
           $ne=0;
           include(load_language("lang_usercp.php"));
           for ($i=0;$i<count($subscriptors);$i++)
            {
                if (in_array($categoria, explode(",",$subscriptors[$i]["subscription"])))
                  {
                   $bcc[]=$subscriptors[$i]["email"];
                   $ne++;
                   if ($ne>49)
                      send_mail($SITEEMAIL,$language["SUB_SUBJECT"],sprintf($language["SUB_EMAIL"],$filename, "$BASEURL/index.php?page=torrent-details&id=$hash","$BASEURL/download.php?id=$hash&f=" . urlencode($filename) . ".torrent"),false,array(),$bcc);
                }
            }

            send_mail($SITEEMAIL,$language["SUB_SUBJECT"],sprintf($language["SUB_EMAIL"],$filename, "$BASEURL/index.php?page=torrent-details&id=$hash","$BASEURL/download.php?id=$hash&f=" . urlencode($filename) . ".torrent"),false,array(),$bcc);
         }


Note: What I understood is email is sending to only first value from the array of emails.
« Last Edit: November 22, 2018, 01:49:53 pm by colors »

 


Powered by EzPortal