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

Reply via email to