Re: Mail_Queue problem
| From: | Tyrone | Date: | Fri, 28 May 2004 17:17:54 +0000 |
| Subject: | Re: Mail_Queue problem | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12773@lists.php.net to get a copy of this message | ||
Ok, I tried something else but I still need help here. Here is the code
that I'm using, straight from the mail_queue examples.
---------------- start code ---------------------------------------
$mail_queue =& new Mail_Queue($db_options, $mail_options);
$mail_queue->setBufferSize(5000);
while ($mail = $mail_queue->get()) {
$result = $mail_queue->sendMail($mail);
}
--------------- end code -----------------------------------------
This sends out mail from my mail queue, but it doesn't delete them from the
queue, unlike $mail_queue->sendMailsInQueue(); will do. Is there something
else that I need to do to have the sendMail() function delete sent mails
from the queue?
"Tyrone Cheung" <Tyrone.Cheung@canopus.com> wrote in message
news:37FB090D216A3C4192D7EA7067E355E4E563E4@cc-svr-mail.us.canopus.local...
Hello Everyone,
I am a new user of PEAR and I love the concept of the Mail_Queue for
mailing out our newsletters to thousands of subscribers. I have gotten
to the point where everything seems to be installed properly. When I
ran a "$mail_queue->sendMailsInQueue();" call in my script to send out
all mails in the queue, it worked for a while, and then hung. I am
using an SMTP server to send out the emails. I thought it was stalling
because it was opening up too many connections to the SMTP server, but
after shutting down the database for a day and getting back to it, it
still will not send out the rest of the emails in the queue. It may
send out around 20 - 50 emails occasionally, but then it stops working.
Does anyone know what I should check to try and fix this problem?
Thanks,
Tyrone