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

Bug #12768 On errors, sendMail marks mail as sent anyway
Submitted: 2007-12-24 04:50 UTC
From: flug Assigned: quipo
Status: Closed Package: Mail_Queue (version 1.2.1)
PHP Version: 4.4.3 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2007-12-24 04:50 UTC] flug (Brent Hugh)
Description: ------------ File: Queue.php Function: sendMail around line 381. Includes this code: $sent = $this->send_mail->send($recipient, $hdrs, $body); if ($sent and $set_as_sent) { $this->container->setAsSent($mail); } The problem is that if $this->send_mail->send returns and error, there doesn't seem to be any check, and if $set_as_sent is true (the default value) then it just goes ahead & sets that email as "sent" even though the error prevented it from being sent. I was able to reproduce this error at will simply by changing my SMTP login/password to something invalid and then trying to send mail that was queued. All was set as sent though in fact none was actually sent.

Comments

 [2008-01-05 00:15 UTC] bate (Marco Kaiser)
I will commit a fix in the next days.
 [2008-03-05 11:15 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.