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

Request #4241 More detailed error for SMTP mail
Submitted: 2005-04-28 14:47 UTC
From: amynevada at hotmail dot com Assigned: jon
Status: Closed Package: Mail
PHP Version: 4.3.11 OS: Fedora core 2
Roadmaps: (Not assigned)    
Subscription  


 [2005-04-28 14:47 UTC] amynevada at hotmail dot com
Description: ------------ When i send a Mail and the SMTP server give unrecognized responce, it would be useful to report on Error Message what kind of responce the SMTP server has sended : For example if the SMTP server sends this message in responce to a $smtp->rcptTo($recipient))) function: --- Recv: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) --- On the Pear Error it would be useful to know what kind of response SMTP server has sended (In order to debug all problem). This is the line changed from Mail/smtp.php, Line 198: foreach ($recipients as $recipient) { if (PEAR::isError($res = $smtp->rcptTo($recipient))) { list($code,$message)=$smtp->getresponse(); return PEAR::raiseError('unable to add recipient [' .$recipient . ']: Code:'.$code.' Message:'.$message . "\n".$res->getMessage()); } } if (PEAR::isError($smtp->data($text_headers . "\r\n" . $body))) { list($code,$message)=$smtp->getresponse(); return PEAR::raiseError('unable to send data: Code:'.$code.' Message:'.$message . "\n".$res->getMessage()); }

Comments

 [2005-08-22 01:08 UTC] jon
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.