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)    
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:
Solve the problem : 31 + 33 = ?

 [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.


 [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 by the end of next Sunday (CET). If this was a problem with the 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.