+
+sub sendinfo {
+ local ($wherefrom,$path,$description) = @_;
+ if ($wherefrom eq "ftp.d.o") {
+ $doc = `lynx -nolist -dump http://ftp.debian.org/debian/indices/$path.gz 2>&1 | gunzip -cf` or &quit("fork for lynx/gunzip: $!");
+ $! = 0;
+ if ($? == 255 && $doc =~ m/^\n*lynx: Can\'t access start file/) {
+ &transcript("$description is not available.\n");
+ $ok++; return;
+ } elsif ($?) {
+ &transcript("Error getting $description (code $? $!):\n$doc\n");
+ return;
+ }
+ } elsif ($wherefrom eq "local") {
+ open P, "$path";
+ $doc = do { local $/; <P> };
+ close P;
+ } else {
+ &transcript("internal errror: info files location unknown.\n");
+ $ok++; return;
+ }
+ &transcript("Sending $description.\n");
+ &sendmailmessage(<<END.$doc,$replyto);
+From: $gMaintainerEmail ($gProject $gBug Tracking System)
+To: $replyto
+Subject: $gProject $gBugs information: $description
+References: $header{'message-id'}
+In-Reply-To: $header{'message-id'}
+Message-ID: <handler.s.$nn.info.$midix\@$gEmailDomain>
+
+$description follows:
+
+END
+ $ok++;
+ &transcript("\n");
+}