phpBBHacks.com - Emails queue doesn't work
Find affordable web hosting packages at iFroggy Hosting
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Username:    Password:
Remember Me?    
   I Lost My Password!
Bookmark and Share
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> General phpBB 3 Support and Discussion
 See a User Guidelines violation? Please contact us.
Author Message

lukasamd
New User

Joined: 13 Aug 2010
Posts: 1
Location: Przemków

PostPosted: August 13th 2010, 2:26 am    Post subject: Emails queue doesn't work Reply with quote

Hello,
emails queue in phpBB3 doesn't work!
It's my code from newsletter system:

Code:
      include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
      $messenger = new messenger();
      $max_emails = 80;
      $i = 0;
      $j = 0;
      $email_list = array();
      $email_date = strftime('%A, %e %B %Y');
      $email_subject = stripslashes($data_news['news_subject']);
     

      // Get emails list
      $sql = 'SELECT *
              FROM ' . NEWSLETTER_SUBS_STABLE . '
              ORDER BY newsletter_sub_id DESC';
      $result = $db->sql_query($sql);

      // Build emails array
      while ($row = $db->sql_fetchrow($result))
      {
        if ($i == $max_emails)
        {
          $j++;
          $i = 0;
        }
       
        $email_list[$j][$i]['email'] = $row['newsletter_sub_mail'];
        $i++;
      }
     
      // Sending emails
         for ($i = 0, $size = sizeof($email_list); $i < $size; $i++)
         {
            for ($j = 0, $list_size = sizeof($email_list[$i]); $j < $list_size; $j++)
            {
               $email_row = $email_list[$i][$j];

               $messenger->{((sizeof($email_list[$i]) == 1) ? 'to' : 'bcc')}($email_row['email'], $email_row['email']);
        }

        $messenger->template('newsletter', 'pl');
            $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
            $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
            $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
            $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
        $messenger->assign_vars(array(
          'SUBJECT'   => $email_subject,
          'NEWSLETTER'   => $data_news['news_news'],
          'DATE'   => $email_date,
        ));
        $messenger->send();
         }
         $messenger->save_queue();
         unset($email_list);


Max. email packet size: 80 emails.
Queue time (changed in database): 1800 (second).

I sent about 600 emails.
When I run script, the appeared a queue file in cache folder, but emails are send in about 1-2 minutes (and queue file was removed)!
Of course I got a lot of messages:

Quote:
Domain mydomain has exceeded the max emails per hour (500) allowed. Message discarded.


What's wrong?!
Back to top
View user's profile Send private message Visit poster's website

Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.

PostPosted: August 17th 2010, 12:30 pm    Post subject: Reply with quote

Welcome aboard, lukasamd. Does anyone have any thoughts on this?

Thanks,

Patrick
_________________
Patrick O'Keefe - phpBBHacks.com Administrator - Feedback? Questions? Please Contact Me!
User Guidelines - Featured phpBB - Featured Author - phpBBHacks.com Awards - Supported Sites - About Us
Author, Managing Online Forums - A Practical Guide to Community Management
phpBB 3 Tutorials: Add Hacks | Clear Your Cache | Fix Missing Images | phpBB 3 Permissions Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> General phpBB 3 Support and Discussion All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil - phpBB Portugal - phpBBpersian.com

Network: iFroggy Hosting - PhotoshopForums.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - KarateForums.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Disclosure Policy - Staff - User Guidelines >

Copyright © 2001-2012. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.