Re: [fw-general] Use Zend_Queue for sending mails
On Mon, May 17, 2010 at 6:41 AM, Ralf Eggert r.egg...@travello.de wrote: Hi Jurian, I'd store only the data. The instance of Zend_Mail can be reused with new data to send the next mail, so you don't need to instantiate Zend_Mail for each new email. That is the solution I am implementing now. Its also a matter of performance since I need to create almost 50.000 mails. Creating these mails and saving them in a Zend_Queue will take much more time than just saving some primary keys. Thanks and best regards, Ralf Maybe you want to look at Mail_Queue: http://pear.php.net/Mail_Queue Till
Re: [fw-general] Use Zend_Queue for sending mails
On 05/14/2010 11:36 AM, Ralf Eggert wrote: Hi, I want to use Zend_Queue to send bulk mails (newsletters). These newsletters are individualized. I think I have two general options how to handle this: a) Create all Zend_Mail objects and send them serialized to the Zend_Queue. When the queue is processed, I only need to send these mails out. b) Just send the parameters in the Zend_Queue (user id, newsletter id). When the queue is processed I create the Zend_Mail objects from these parameters and send them out. If I were to use Zend_Queue, I'd recommend option b. If you want to take a look at how we do it, visit http://projects.binaryvibes.co.in/repositories/entry/bizsense/trunk/application/modules/default/models/Newsletter/Message/Queue.php We don't use Zend_Queue though. We store all the required information in message_queue table and process the queue via cron. -- With warm regards, Sudheer. S Tech stuff: http://techchorus.net Business: http://binaryvibes.co.in
Re: [fw-general] Use Zend_Queue for sending mails
Hi Jurian, I'd store only the data. The instance of Zend_Mail can be reused with new data to send the next mail, so you don't need to instantiate Zend_Mail for each new email. That is the solution I am implementing now. Its also a matter of performance since I need to create almost 50.000 mails. Creating these mails and saving them in a Zend_Queue will take much more time than just saving some primary keys. Thanks and best regards, Ralf
[fw-general] Use Zend_Queue for sending mails
Hi, I want to use Zend_Queue to send bulk mails (newsletters). These newsletters are individualized. I think I have two general options how to handle this: a) Create all Zend_Mail objects and send them serialized to the Zend_Queue. When the queue is processed, I only need to send these mails out. b) Just send the parameters in the Zend_Queue (user id, newsletter id). When the queue is processed I create the Zend_Mail objects from these parameters and send them out. Which option would you prefer and why? Is there a third option I haven't thought of yet? Thanks and best regards, Ralf
Re: [fw-general] Use Zend_Queue for sending mails
On Friday 14 May 2010 08:06:54 Ralf Eggert wrote: Hi, I want to use Zend_Queue to send bulk mails (newsletters). These newsletters are individualized. I think I have two general options how to handle this: a) Create all Zend_Mail objects and send them serialized to the Zend_Queue. When the queue is processed, I only need to send these mails out. b) Just send the parameters in the Zend_Queue (user id, newsletter id). When the queue is processed I create the Zend_Mail objects from these parameters and send them out. Which option would you prefer and why? Is there a third option I haven't thought of yet? Thanks and best regards, Ralf I'd store only the data. The instance of Zend_Mail can be reused with new data to send the next mail, so you don't need to instantiate Zend_Mail for each new email. -- Jurian Sluiman CTO Soflomo V.O.F. http://soflomo.com