a PATCH to PEAR Mail class to select the auth Method
| From: | Damian Alejandro Fernandez Sosa | Date: | Fri, 24 Jan 2003 01:59:21 +0000 |
| Subject: | a PATCH to PEAR Mail class to select the auth Method | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-12690@lists.php.net to get a copy of this message | ||
I attach to this email a patch to smtp.php file of the Mail package
to add a parameter (authMethod) to allow the selection of the auth
method.
Since Net_SMTP 1.1.0 version, the class allows to authenticate with
DIGEST-MD5,CRAM-MD5, LOGIN and PLAIN methods by choosing the best auth
method available first but you can overide this selection by passing a
3rd parameter to the auth() method.
This patch do this by adding a authMethod param to the constructor's
params array.
So now with this patch you can create a smtp object and selecting the
CRAM-MD5 auth method doing:
require_once 'Mail.php';
$params['host']="localhost";
$params['port']=25;
$params['auth']=true;
$params['username']="foo";
$params['password']="bar";
$params['authMethod']="CRAM-MD5";
$mailer = &Mail::factory("smtp", $params);
If you agree with this patch please commit to allow to use this feature.
Thanks!
Attachment: [text/x-patch] smtp.php.authMethod
Attachment: [text/x-patch] smtp.php.authMethod