Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.7

Request #19378 Cannot preload items: limit
Submitted: 2012-04-09 07:15 UTC
From: truenorf Assigned: till
Status: Closed Package: Mail_Queue (version 1.2.7)
PHP Version: 5.3.3 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 10 - 8 = ?

 
 [2012-04-09 07:15 UTC] truenorf (True Norf)
Description: ------------ Still getting "Mail Queue Error: Cannot initialize container" and "Cannot preload items: limit" in ver 1.2.7 when trying to send 50 emails in a batch. Test script: --------------- //snip - - - $container_options and $mail_options init - - - /* How many mails could we send each time the script is called */ $max_amount_mails = 50; $mail_queue =& new Mail_Queue($container_options, $mail_options); $result = $mail_queue->sendMailsInQueue($max_amount_mails); Expected result: ---------------- 50 emails sent from queue Actual result: -------------- Some emails sent from queue (how many, I don't know?!) and the error messages: "Mail Queue Error: Cannot initialize container" and "Cannot preload items: limit"

Comments

 [2012-07-05 19:46 UTC] panamajo (Jo Schulze)
I ran into the same problem and solved it: This (bogus) error message always occurs when Mail_Queue::$limit % Mail_Queue_Container::$buffer_size == 0 The "Cannot initialize container" message is wrong. It is generated in Mail_Queue_Container->get() and apparently when it is executed we have a valid initialized container instance. I guess the 2 uses of MAILQUEUE_ERROR_CANNOT_INITIALIZE are a C&P error. Just replace the content in the 2nd condition: if ($err !== true) { // limit met return FALSE; } instead of returning a Mail_Queue_Error instance with a misleading message.
 [2012-11-03 23:58 UTC] till (Till Klampaeckel)
-Status: Open +Status: Wont fix -Type: Bug +Type: Feature/Change Request
I can't reproduce this bug with the new codebase. If you guys want to have a look — this is almost done: https://github.com/pear2/Mail_Queue Otherwise, please re-open with a test case.
 [2012-11-04 00:34 UTC] till (Till Klampaeckel)
-Status: Wont fix +Status: Closed -Assigned To: +Assigned To: till
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I managed to write a test and was able to squash this bug in the new code base: https://github.com/pear2/Mail_Queue/commit/971d1a9b3c35ee7213d765173c1619a8 f4e090ad