On Nov 26, 2005, at 1:56 AM, via RT wrote:
Show quoted text>> On Nov 24, 2005, at 11:59 PM, via RT wrote:
>>> Net::SMTP doesn't seem to support LOGIN, PLAIN, NTLM SMTP
>>> authentication.
>>
>> Net::SMTP uses Authen::SASL and supports LOGIN and PLAIN, but not
>> NTLM
>>
>
> Well, after checking in the source code of Net::SMTP, I have an
> impression that ->auth tries to auto-detect the auth mechanism.
Yes, it has to determine what mechanisms the server supports so it
can tell
Authen::SASL which to use.
Show quoted text> Unfortunately, that detection fails for my SMTP server.
Well it would be useful to me if you at least attempted to describe
how it fails.
What do you see on stderr when debug is on. Just telling someone that
something
does not work is not useful at all.
Show quoted text> I'm very happy when I see ->auth also acceptes users' Authen::SASL
> object by which I can specify the mechanism explictily:
>
> $sasl = Authen::SASL->new(
> mechanism => 'LOGIN',
> callback => {
> user => $user,
> pass => $password,
> },
> );
>
> $smtp->auth($sasl);
>
> Woot! That works pretty fine, but it is __NOT__ documented at all.
I am amazed that this works and just passing user/passwd does not.
Net::SMTP gets a list of mechanisms from your server which would
override yours.
Show quoted text> But I wish Net::SMTP to provide cleaner interface for its ->auth
> method.
> Maybe one day I can specify my auth mechanism without bother defining
> my own SASL object, and can write something as simple as the
> following:
>
> $smtp->auth($user, $password, type=>'LOGIN');
>
> You see, this won't break the current interface, but is more
> flexible. What do you think of it?
This should not be needed. User and password is all that should be
needed.
Graham.