I got this error when doing the --morning Can't call method "mail" on an
undefined value at /usr/local/smokeping/tsmoke/tsmoke.pl line 80.

Any thoughts?

Tsmoke.pl
sub sendmail ($$$$){
    my $from = shift;
    my $to = shift;
    my $subject = shift;
    my $body = shift;
    if ($cfg->{General}{mailhost}){
        my $smtp = Net::SMTP->new($cfg->{General}{mailhost});
        $smtp->mail($from);  ##<--line 80
        $smtp->to($to);
        $smtp->data();
        $smtp->datasend("Subject: $subject\n");
        $smtp->datasend("To: $to\n");
        $smtp->datasend($body);
        $smtp->dataend();
        $smtp->quit;
    } elsif ($cfg->{General}{sendmail} or -f "/usr/lib/sendmail"){
        open (M, "|-") || exec (($cfg->{General}{sendmail} ||
"/usr/lib/sendmail"),"-f",$from,$to);
        print M "Subject: $subject\n";
        print M $body;
        close M;
    }
}

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Saturday, July 31, 2004 4:30 PM
To: [EMAIL PROTECTED]
Subject: [smokeping-users] Re: Smokeping result howto

Thanks Arnold.

tSmoke --morning option working fine but when i am running tSmoke
--weekly
getting error "ERROR: can't read"


Quoting Arnold Nipper <[EMAIL PROTECTED]>:

> On 31.07.2004 18:14 [EMAIL PROTECTED] wrote:
> > Hi,
> > 
> > I am using smokeping (probe- FPing) to monitor 10 website and submit
report
> to
> > authority of Avg. RTT and Avg. Packet Loss of last 24 hours. Is
there any
> > sript, which will calculate Avg. RTT and Avg. Packet Loss of last 24
hours
> and
> > will mail to a address daily? 
> > 
> 
> Did you have a look at tsmoke, which is in
> http://people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/contrib/
> 
> 
> 
> 
> Arnold
> 
> --
> Unsubscribe
> mailto:[EMAIL PROTECTED]
> Help
mailto:[EMAIL PROTECTED]
> Archive     http://www.ee.ethz.ch/~slist/smokeping-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
> 
> 




--------------------------------------------------
This message was sent through http://www.link3.net

--
Unsubscribe
mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/smokeping-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/smokeping-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to