Re: Mail_Queue
| From: | Radek Maciaszek | Date: | Sun, 19 Oct 2003 19:21:47 +0000 |
| Subject: | Re: Mail_Queue | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22823@lists.php.net to get a copy of this message | ||
Gabe Da Silveira wrote:
What is the development status of Mail_Queue? It's listed as stable, but after trying to use it I feel like there are some serious design issues related to its error handling. I'm not a PEAR expert, but Mail_Queue seems to be doing a few things that seem to go against the spirit of PEAR. The first thing I noticed is that the Mail_Queue_Error class hardcodes an error mode (PEAR_ERROR_PRINT no less). Secondly, shouldn't errors be generated by raiseError() rather than just calling the PEAR_Error constructor directly? Normally that doesn't seem to be a big deal, but take a look at the method Mail_Queue->sendMailsInQueue(). If a mail is not successfully accepted for delivery, then an Error is returned and processing stops. This doesn't strike me as logical behaviour since if you have a big list of emails to send out, and one fails, that usually doesn't mean that you want to just give up on the rest of them. At the very least, this ought to be a configurable option. Still, I find the class useful, so I'm hacking it. I would propose a patch, but A) I'm not sure of the procedure for doing so and B) I'm just hacking the bits I need though I think the whole error percolation of the class should be examined.Please checkout the CVS version. With this new version (thanks to Lorenzo Alberton) you can change error modes. I'm going to make more changes before next official release. Regards, Radek Maciaszek