Bug #3291 [Opn]: Mail can not be sent
| From: | tchoudinov at yahoo dot com | Date: | Tue, 25 Jan 2005 12:15:09 +0000 |
| Subject: | Bug #3291 [Opn]: Mail can not be sent | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-5471@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=3291&edit=1
ID: 3291
User updated by: tchoudinov at yahoo dot com
Reported By: tchoudinov at yahoo dot com
Status: Open
Type: Bug
Package: Documentation
Operating System: Windows2000 server SP4
PHP Version: 4.3.9
New Comment:
Note $smtp->identifySender() function call in the version that works
fine. This call is absent in the last version of Mail_smtp::send()
function.
Previous Comments:
------------------------------------------------------------------------
[2005-01-25 07:12:13] tchoudinov at yahoo dot com
Description:
------------
When I try to send mail using Mail::send with smtp backend it does not
work. Method Send() reports "unable to connect to smtp server", but all
the SMTP server credentials are correct.
Class Mail_smtp (extends class Mail)
File smtp.php
* @package Mail
* @version $Revision: 1.12 $
The code contains this error is somewhere here in function
Mail_smtp::send(...):
----------------------------------------------------
if ($this->auth) {
$method = is_string($this->auth) ? $this->auth : '';
if (PEAR::isError($smtp->auth($this->username,
$this->password,$method))) {
return new PEAR_Error('unable to authenticate to smtp server');
}
}
Reproduce code:
---------------
The same part of code in function Mail_smtp::send(...) in the previos
version
* @package Mail
* @version $Revision: 1.3 $
was just:
----------------
if ($this->auth) {
if (PEAR::isError($smtp->auth($this->username, $this->password))) {
return new PEAR_Error('unable to authenticate to smtp server'); }
if (PEAR::isError($smtp->identifySender())) { return new
PEAR_Error('unable to identify smtp server'); }
}
----------------
This code works fine. Mail is sent.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=3291&edit=1