Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- "Host =>" in the Net::SMTP module
August 15, 2007, 12:37 pm
rate this thread
The following doc :
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 :
only the second option is documented.
On my server, and with the last version of the module, the first option
Do you know why ?
Has it changed with newer versions of the module ?
Re: "Host =>" in the Net::SMTP module
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.
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