Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.7

Bug #6538 Error on mail send causes infinite send loop
Submitted: 2006-01-20 12:50 UTC
From: nyeholt at gmail dot com Assigned: quipo
Status: Closed Package: Mail_Queue
PHP Version: 4.3.11 OS: RHEL 4
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 28 - 22 = ?

 
 [2006-01-20 12:50 UTC] nyeholt at gmail dot com
Description: ------------ The method sendMailsInQueue can get into an infinite loop if there's a send error (and the application doesn't break out on a NOTICE error for some reason, like an overloaded error_handler) as the errornous mail isn't removed from the queue, and is the next one returned from $this->get(). This loops until you start receiving errors from Net::Socket when it gets its connects dropped by the mail server. Test script: --------------- Possible fix if (!PEAR::isError($result)) { $this->container->setAsSent($mail); if($mail->isDeleteAfterSend()) { $this->deleteMail($mail->getId()); } } else { PEAR::raiseError( 'Error in sending mail: '.$result->getMessage(), MAILQUEUE_ERROR_CANNOT_SEND_MAIL, PEAR_ERROR_TRIGGER, E_USER_NOTICE); if($mail->isDeleteAfterSend()) { $this->deleteMail($mail->getId()); } } Or just $this->deleteMail($mail->getId()); Expected result: ---------------- Mail is removed from the queue, subsequent emails processed. Actual result: -------------- 2006-01-20 07:21:39][12:Root User][1024:mysource notice][R] (/usr/share/pear/PEAR.php:763) - Error in sending mail: Failed to send data [SMTP: Invalid response code received from server (code: 554, response: Error: no valid recipients)] [2006-01-20 07:21:39][12:Root User][8:php notice][R] (/usr/share/pear/Net/Socket.php:295) - fwrite(): send of 37 bytes failed with errno=32 Broken pipe [2006-01-20 07:21:39][12:Root User][8:php notice][R] (/usr/share/pear/Net/Socket.php:295) - fwrite(): send of 6 bytes failed with errno=32 Broken pipe

Comments

 [2007-01-20 11:25 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!