-- Luke Richards <[email protected]> wrote
(on Tuesday, 10 November 2009, 02:28 PM +0000):
> We use the Zend_Mail classes where I work and we're sending a lot of emails. 
> It
> was a while ago but I think we had the same problem running out of memory. We
> tracked the problem down to the ZF SMTP transport. If you are using that try
> overriding it with the following code. We found the problem to be a log being
> kept on the abstract protocol class. Each time the protected send method is
> called is attaches the request to the end of the log.

Could you post an issue in the tracker indicating this, as well as your
fix? It's probably something we should resolve.

> class Yourlibrary_Mail_Transport_Smtp extends Zend_Mail_Transport_Smtp
> {
>     /**
>      * Send a mail using this transport
>      *
>      * @param  Zend_Mail $mail
>      * @access public
>      * @return void
>      * @throws Zend_Mail_Transport_Exception if mail is empty
>      */
>     public function send(Zend_Mail $mail)
>     {
>         $connection = $this->getConnection();
>         if ($connection instanceof Zend_Mail_Protocol_Smtp) {
>             $connection->resetLog();
>         }
>         return parent::send($mail);
>     }
> }

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/

Reply via email to