Click here to get back home

"Host =>" in the Net::SMTP module

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
"Host =>" in the Net::SMTP module fab 08-15-2007
Posted by fab on August 15, 2007, 8:37 am
Please log in for more thread options


Hello,

The following doc :
http://search.cpan.org/~gbarr/libnet-1.19/Net/SMTP.pm#CONSTRUCTOR

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#constructor

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

Posted by Sisyphus on August 15, 2007, 9:20 am
Please log in for more thread options



.
.
> 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


Similar ThreadsPosted
RFC: new module Net::SMTP::PostfixExt February 20, 2008, 3:49 pm
How do you telnet from 1 host to another using Telnet Module December 21, 2005, 4:15 pm
Read user log from a remote host July 26, 2006, 5:14 am
SMTP::new() October 11, 2005, 2:36 am
Net::SMTP July 25, 2006, 8:44 am
net smtp help October 24, 2006, 4:02 pm
Net::Telnet and SMTP June 13, 2005, 11:01 am
Question on NET::SMTP new() October 11, 2005, 2:32 am
SMTP: "to" or/and "recipient" question. November 11, 2005, 8:52 am
Net::SMTP Can't get AUTH working... November 2, 2006, 5:39 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap