Done

http://framework.zend.com/issues/browse/ZF-8278

Matthew Weier O'Phinney wrote:
-- 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);
    }
}


--
Luke Richards

Emailcenter UK Limited
Kingthorn Park
Bradden Road
Greens Norton
Towcester
Northamptonshire
NN12 8BS

e: [email protected]
t: 01327 350921
f: 01327 359502
www.emailcenteruk.com

UK Leaders in permission email marketing solutions and services
Privileged/Confidential information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such cases, you should destroy this message, and please notify us 
immediately.

Please advise immediately if you or your employer does not consent to Internet 
e-mail for messages of this kind. Opinions, conclusions and other information 
expressed in this message are those of the author and not necessarily endorsed 
by Emailcenter UK Limited unless indicated by an authorised representative of 
the company independent of this message. If you need to contact Emailcenter 
please call ++44(0) 1327 350921.

Emailcenter UK Limited is registered in the UK. Reg No.04254916

Reply via email to