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

Bug #17989 sometimes a space is added to FROM adr.
Submitted: 2010-10-25 14:23 UTC
From: andreab Assigned: jon
Status: Closed Package: Net_SMTP (version 1.4.4)
PHP Version: 5.2.4 OS: Ubuntu 10.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 : 43 - 14 = ?

 
 [2010-10-25 14:23 UTC] andreab (Andrea Bag)
Description: ------------ Sometimes a space is added at the end of FROM: address (before the terminator CR/LF). That caused some SMTP server (Eudora EIMS 3.3.9) to refuse the address as malformed. The problem was in method: mailFrom($sender, $params = null) at line: } elseif (is_string($params)) { $args .= ' ' . $params; } in case of $params=empty string, the function add a space at end of address. I solved with: } elseif (!empty($params) && is_string($params)) { // may be !empty($params) alone is enaugh....... $args .= ' ' . $params; } Best regards Andrea Bagnini Test script: --------------- $host = "mail.serdata.it"; $port = "587"; $username = 'user@dom.com'; $password = 'mypsw'; $headers = array ('To' => $to, 'From' => $from, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'localhost' => 'myserver', 'debug' => false, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); Expected result: ---------------- The FROM: address must NOT contain any blanks Actual result: -------------- The FROM: address DOES contain a blank (ASCII 32) before the CR/LF terminator

Comments

 [2010-10-26 10:30 UTC] jon (Jon Parise)
-Status: Open +Status: Closed -Assigned To: +Assigned To: jon
This bug has been fixed in SVN. 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.