IT WORKS PERFECT !!!
now last part. E-mail. i have this from a book but i get a error about the $smtp->mail($from); part.
$from = "colinctdprep@oceanfree.net";
@body = $result;
$subject = "PERL pinghost program report";
{
$smtp = Net::SMTP->new("icmp");
die "Could not make connection: $!" if (defined $smtp);
$smtp->mail($from);
$smtp->to($to);
$smtp->data();
$smtp->datasend("To: $to\n");
$smtp->datasend("From: $from\n");
$smtp->datasend("Subject: $subject\n");
$smtp->datasend("\n");
foreach(@body) {
$smtp->datasend("$_\n");
}
$smtp->dataend();
$smtp->quit;
}
this is for windows NT. can you PLEASE help on this.
It has to open a list of e-mail address and put the @pingDetails into a text file and e-mail it to the e-mail address in the file.
and it has to use
colin@oceanfree.net as the sending e-mail.
And i really apprectate the help.