RE: [PEAR] Re: Mail_Queue problem

From: Date: Fri, 28 May 2004 19:04:25 +0000
Subject: RE: [PEAR] Re: Mail_Queue problem
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12778@lists.php.net to get a copy of this message
I am using the DB driver. So far I have tried sendMailsInQueue() and it doen't send everything in the queue. Now I am using the while loop with the modification that you have sent me to delete the messages in the queue. It works fine aside from sending half of the mail queue everytime I run the script. Meaning if I have 100 mails in my queue, it will send 50, then stop. Then if I run it again, it will send 25, then stop, and so on. Have you ever heard of this behavior? Tyrone -----Original Message----- From: Lorenzo Alberton [mailto:l.alberton@quipo.it] Sent: Friday, May 28, 2004 11:55 AM To: Tyrone Cheung Cc: PEAR GENERAL Subject: Re: [PEAR] Re: Mail_Queue problem On Fri, 28 May 2004 11:06:35 -0700, Tyrone wrote: > Thanks Lorenzo, > That helped. However, now it seems that everytime I run the script it > sends out exactly half of the mail in the mail_queue rather than the > whole thing. Is this by design? Any way to get around this and send > out the whole queue at one time? Thanks again. sendMailsInQueue() by default will send all the mails in the queue, unless you specify a $limit (default is MAILQUEUE_ALL) and an $offset. if you choose the while cycle: while ($mail = $mail_queue->get()) { $result = $mail_queue->sendMail($mail); } it should fetch all the mails in the queue as well. If not, there's a problem indeed. Which driver are you using? DB or MDB? Best regards, -- Lorenzo Alberton http://pear.php.net/user/quipo

« previous php.pear.general (#12778) next »