Bug #17631 Updated: SMTP Auth never returns

From: Date: Fri, 07 Jun 2002 06:07:17 +0000
Subject: Bug #17631 Updated: SMTP Auth never returns
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6773@lists.php.net to get a copy of this message
ID: 17631 Updated by: cox@php.net Reported By: scarr@progbits.com -Status: Open +Status: Closed Bug Type: PEAR related Operating System: WIN2k PHP Version: 4.2.1 New Comment: Fixed in CVS. Thanks Scott. Tomas V.V.Cox Previous Comments: ------------------------------------------------------------------------ [2002-06-06 14:44:37] scarr@progbits.com Net/SMTP.php has an error in the Auth code. If you set $params['auth'] = true; then the script never returns. The problem exists in the following two lines: *Line 138* if (PEAR::isError($this->socket->write(base64_encode($uid) . "\n"))) { return new PEAR_Error('write to socket failed'); } *Line 141* if (PEAR::isError($this->socket->write(base64_encode($uid) . "\n"))) { return new PEAR_Error('write to socket failed'); } Notice the \n instead of \r\n. This causes the SMTP server to hang waiting for a valid line termination response. SOLUTION: Change \n to \r\n and AUTH works fine. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17631&edit=1

« previous php.pear.dev (#6773) next »