|
Posted by Andrzej Adam Filip on July 25, 2006, 9:04 am
Please log in for more thread options
> Hi.
> I`ve got problem with module Net::SMTP. I want to check my SMTP server
> is working proparly so i run this script:
> #!/usr/bin/perl -w
>
> use Net::SMTP;
> $smtp = Net::SMTP -> new('100.100.100.100',
> Hello => 'my_name.ma_domain',
> Timeout => 10,
> Debug => 1
> );
>
>
> $smtp->mail('admin@');
> $smtp->to('postmaster');
> $smtp->quit;
>
> Debug:
> bash-3.00# ./sesja_smtp1.pl
> Can't call method "mail" on an undefined value at ./sesja_smtp1.pl line
> 9.
use Net::SMTP;
$smtp = Net::SMTP -> new('100.100.100.100',
Hello => 'my_name.ma_domain',
Timeout => 10,
Debug => 1
);
if( !defined($smtp)){
# $smtp object have not been created. Problem report is in $@
die $@;
}
> [...]
--
[pl2en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl
|