Try this one, http://jenda.krynicky.cz/#Mail::Sender I have been using it fore a long time now. It works well whit SMTP auth.

/Ulf


At 03:50 2004-12-19, Bennett Haselton wrote:
[sorry if this is a dupe, but I don't know if I was subscribed the first time I sent it]

Does anybody have any sample code for sending mail from a Perl script on Windows, through an SMTP server that requires SMTP authentication?

I have a script where I wrote the logic in fifteen minutes and then have spent about three hours trying to look up a way for Perl to simply send the email. I found the Mail::Mailer module but its documentation page says it specifically doesn't support SMTP authentication. I found the Net::SMTP_auth module searching PPM modules for "SMTP", but the sample code given in the documentation:

$smtp->auth('CRAM-MD5', 'user', 'password');

only shows how set the authentication method to "CRAM-MD5". It doesn't list any other valid values that are accepted for the authentication method. It does say that I can use this code:

$smtp = Net::SMTP_auth->new('mail.speakeasy.net');
print $smtp->auth_types();

to find out what authentication types are supported by mail.speakeasy.net; when I do that, the only value returned is "LOGINPLAIN", and if I try this code:

$smtp->auth('LOGINPLAIN', 'user', 'password');

I get the error:

No SASL mechanism found
 at C:/Perl/site/lib/Authen/SASL.pm line 62

which I assume is the generic error meaning the Net::SMTP_auth module doesn't support that authentication type, since it's the same error I get if I try using a junk authentication type e.g.

$smtp->auth('FOOBAR', 'user', 'password');

        -Bennett
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to