Index: smtp.php =================================================================== RCS file: /repository/pear/Mail/Mail/smtp.php,v retrieving revision 1.5 diff -u -r1.5 smtp.php --- smtp.php 15 Jan 2003 04:02:28 -0000 1.5 +++ smtp.php 24 Jan 2003 01:37:19 -0000 @@ -44,7 +44,14 @@ * @var boolean */ var $auth = false; + + /** + * Use this method istead of the Net_SMTP autoselection + * @var string + */ + var $authMethod = false; + /** * The username to use if the SMTP server requires authentication. * @var string @@ -65,6 +72,7 @@ * host The server to connect to. Defaults to localhost. * port The port to connect to. Defaults to 25. * auth Whether or not to use SMTP auth. Defaults to false. + * authMethod select this Auth method * username The username to use for SMTP auth. No default. * password The password to use for SMTP auth. No default. * @@ -80,6 +88,7 @@ if (isset($params['host'])) $this->host = $params['host']; if (isset($params['port'])) $this->port = $params['port']; if (isset($params['auth'])) $this->auth = $params['auth']; + if (isset($params['authMethod'])) $this->authMethod = $params['authMethod']; if (isset($params['username'])) $this->username = $params['username']; if (isset($params['password'])) $this->password = $params['password']; } @@ -116,7 +125,15 @@ if (PEAR::isError($smtp->connect())) { return new PEAR_Error('unable to connect to smtp server ' . $this->host . ':' . $this->port); } if ($this->auth) { - if (PEAR::isError($smtp->auth($this->username, $this->password))) { return new PEAR_Error('unable to authenticate to smtp server'); } + if( $this->authMethod ){ + if (PEAR::isError($smtp->auth($this->username, $this->password, $this->authMethod))) { + return new PEAR_Error('unable to authenticate to smtp server'); + } + }else{ + if (PEAR::isError($smtp->auth($this->username, $this->password))) { + return new PEAR_Error('unable to authenticate to smtp server'); + } + } /* * XXX This call to identifySender() is not needed by Net_SMTP