S
still me
I need some basic info on how to go about doing authentication when
trying to connect to a server using Net::SMTP. I did some searching
but I'm not sure if I hopped on the right train. Feel free to dope
slap me with a better approach... I'm a newbie at Perl and it's object
oriented features.
My program right now does this:
my $smtp = Net::SMTP->new(smtp.example.com');
die "Could not open connection: $!" if (! defined $smtp);
I found some documentation that leads me to believe I can use the code
below, but I'd like some confirmation:
my $smtp =
Net::SMTP->new('smtp.example.com',25,'domainOfAccount.com','MyAccount','MyPassword',
lain);
First question: Does the above modification look legit?
I also found that the are three login schemes (last parameter) of
lain,:login, and :cram_md5. I read some docs on this too... most a
bit obtuse and targeted towards people working the SMTP servers... but
if I understand correctly, this controls how the user/pass is sent to
the SMTP server with "cram_md5" being encrypted, "plain" being clear
text, and "login" is ?
trying to connect to a server using Net::SMTP. I did some searching
but I'm not sure if I hopped on the right train. Feel free to dope
slap me with a better approach... I'm a newbie at Perl and it's object
oriented features.
My program right now does this:
my $smtp = Net::SMTP->new(smtp.example.com');
die "Could not open connection: $!" if (! defined $smtp);
I found some documentation that leads me to believe I can use the code
below, but I'd like some confirmation:
my $smtp =
Net::SMTP->new('smtp.example.com',25,'domainOfAccount.com','MyAccount','MyPassword',
lain);
First question: Does the above modification look legit?
I also found that the are three login schemes (last parameter) of
lain,:login, and :cram_md5. I read some docs on this too... most a
bit obtuse and targeted towards people working the SMTP servers... but
if I understand correctly, this controls how the user/pass is sent to
the SMTP server with "cram_md5" being encrypted, "plain" being clear
text, and "login" is ?