hi Roy
I have a question.
I try to send an error mail, when the transfer was not completed, but I don't get any mails.
Path to sendmail and recipient address are correct:
......................................................................
+...
# check if the first file is still there
my $found = grep /\Q$new\E/, $ftp->ls;
if ($found) { die "The file is still there !\n" and next;
{
# send mail if transfer not completed
open(MAIL, "|/usr/sbin/sendmail -t") || die "Cant send mail. Reason:
+$!";
print MAIL "from:$sender\n";
print MAIL "to:$recipient\n";
print MAIL "subject: transfer was not completed !\n";
print MAIL "transfer of second file failed ! \n";
print MAIL "Time: ", scalar localtime, "\n";
close(MAIL);
}
}
#quit FTP when finished
$ftp->quit;
......................................................................
+...
and I don't get any errors.
greetings
cc
|