Error using SMTP object.
am 01.12.2007 01:57:13 von pgmrdan
I'm getting the following message -
Can't call method "domain" on an undefined value at domain.pl line 4.
When trying to execute the following -
use Net::SMTP;
$smtp = Net::SMTP->new('xxxxxxxxxx.xxx');
print $smtp->domain,"\n";
$smtp->quit;
I'm using my ISP provider in place of the x's.
What am I doing wrong?
Thanks.
Re: Error using SMTP object.
am 01.12.2007 02:41:05 von pgmrdan
Never mind. I had the wrong SMTP server name. It works now.
Thanks.
"pgmrdan" wrote in message
news:fiqb57$83p$1@news.netins.net...
> I'm getting the following message -
>
> Can't call method "domain" on an undefined value at domain.pl line 4.
>
> When trying to execute the following -
>
> use Net::SMTP;
>
> $smtp = Net::SMTP->new('xxxxxxxxxx.xxx');
> print $smtp->domain,"\n";
> $smtp->quit;
>
> I'm using my ISP provider in place of the x's.
>
> What am I doing wrong?
>
> Thanks.
>
>
Re: Error using SMTP object.
am 01.12.2007 12:57:02 von Martijn Lievaart
On Fri, 30 Nov 2007 19:41:05 -0600, pgmrdan wrote:
> Never mind. I had the wrong SMTP server name. It works now.
Yes, but....
> "pgmrdan" wrote in message
> news:fiqb57$83p$1@news.netins.net...
>> I'm getting the following message -
>>
>> Can't call method "domain" on an undefined value at domain.pl line 4.
>>
>> When trying to execute the following -
>>
>> use Net::SMTP;
>>
>> $smtp = Net::SMTP->new('xxxxxxxxxx.xxx');
You never test for success here.
$smtp = Net::SMTP->new('xxxxxxxxxx.xxx') or die "
message>";
>> print $smtp->domain,"\n";
>> $smtp->quit;
HTH,
M4
Re: Error using SMTP object.
am 02.12.2007 02:16:37 von pgmrdan
Good point! Thank you.
"Martijn Lievaart" wrote in message
news:pan.2007.12.01.11.57.02@rtij.nl.invlalid...
> On Fri, 30 Nov 2007 19:41:05 -0600, pgmrdan wrote:
>
> > Never mind. I had the wrong SMTP server name. It works now.
>
> Yes, but....
>
> > "pgmrdan" wrote in message
> > news:fiqb57$83p$1@news.netins.net...
> >> I'm getting the following message -
> >>
> >> Can't call method "domain" on an undefined value at domain.pl line 4.
> >>
> >> When trying to execute the following -
> >>
> >> use Net::SMTP;
> >>
> >> $smtp = Net::SMTP->new('xxxxxxxxxx.xxx');
>
> You never test for success here.
>
> $smtp = Net::SMTP->new('xxxxxxxxxx.xxx') or die "
> message>";
>
> >> print $smtp->domain,"\n";
> >> $smtp->quit;
>
> HTH,
> M4