"Host =>" in the Net::SMTP module
am 15.08.2007 14:37:33 von Patrice
Hello,
The following doc :
http://search.cpan.org/~gbarr/libnet-1.19/Net/SMTP.pm#CONSTR UCTOR
says that you can call the constructor either like this :
$smtp = Net::SMTP->new(
Host => 'mailhost',
....
or directly :
$smtp = Net::SMTP->new('mailhost', ...
(ie, without "Host =>")
But on this doc :
http://theoryx5.uwinnipeg.ca/CPAN/perl/lib/Net/SMTP.html#con structor
only the second option is documented.
On my server, and with the last version of the module, the first option
doesn't work.
Do you know why ?
Has it changed with newer versions of the module ?
Thanks
fab
Re: "Host =>" in the Net::SMTP module
am 15.08.2007 15:20:11 von Sisyphus
"fab" wrote in message news:46c2f38e$1@nntp.unige.ch...
..
..
> On my server, and with the last version of the module, the first option
> doesn't work.
Precisely which version are you running ?
Latest version on CPAN is 1.21 and, according to the docs, the "first
option" should work fine with that version.
> Do you know why ?
Nope.
> Has it changed with newer versions of the module ?
I tend to expect that "the first option" should work with the most recent
versions of Net::SMTP, but perhaps not with earlier versions.
Can you check which version of Net::SMTP you are running:
perl -MNet::SMTP -e 'print $Net::SMTP::VERSION'
or, if you're on Windows:
perl -MNet::SMTP -e "print $Net::SMTP::VERSION"
Whichever version you're running, the behaviour should be as documented in
'perdoc Net::SMTP'.
Cheers,
Rob