Do you have a question? Post it now! No Registration Necessary. Now with pictures!
July 25, 2006, 12:44 pm
rate this thread
I`ve got problem with module Net::SMTP. I want to check my SMTP server
is working proparly so i run this script:
$smtp = Net::SMTP -> new('100.100.100.100',
Hello => 'my_name.ma_domain',
Timeout => 10,
Debug => 1
Can't call method "mail" on an undefined value at ./sesja_smtp1.pl line
I want to write to log some memo when my SMTP server don`t answer to
any of this commands.
Is it possible ?
I found something like that in documentation:
"Unless otherwise stated all methods return either a true or false
value, with true meaning that the operation was a success. When a
method states that it returns a value, failure will be returned as
undef or an empty list."
But i don`t know how to use it with if ore while commands.
Thx for help.
this work but there is another problem. when i receive error message
program ends and i want it to go to next command not to end.
it ends with error:
Net::SMTP: connect: timeout (this is from print $@)
Can't call method "mail" on an undefined value at ./smtp.pl line 11.
end it ends :/