in reply to NET::SMTP and authorization
auth ( USERNAME, PASSWORD )
Attempt SASL authentication. At this time only the
PLAIN mechanism is supported.
At some point in the future support for using
Authen::SASL will be added
I'm guessing that's probably what you're looking for?
The code would look something like:
You'll have to dig a bit through the SMTP sources, I'm not sure if auth really returns a false value on all failure paths, but I think so.use Net::SMTP; my $smtp=Net::SMTP->new('picky.server.com') or die "Can't connect to s +mtp server"; $smtp->auth('user','passwd') or die "Can't authenticate with smtp serv +er"; # rest of smtp session goes here, I guess
|
|---|