#/usr/local/bin/perl5
#
#
#
$pathinfo = $ENV{"PATH_INFO"};
@pathlist = split(/\//, $pathinfo);
$prog = shift(@pathlist);
#$domain = shift(@pathlist);
$username = shift(@pathlist);
$eladdress = shift(@pathlist);
 if ($username eq "1") {
	$username = ""
	}
if ($eladdress eq "1") {
	$eladdress = ""
	}
$tomail = shift(@pathlist);
$subject =join("/",@pathlist);
$domain =~ s/^/-/;
$path = join("/", @pathlist);
$nameemail = join("/","",$username,$eladdress);
#($null,$domain,$path) = split(/\//,$pathinfo);
 
#$domain =~ s/^/-/;
 
if ($path eq "") {
    $path = "";
} else {
    $path = ("/".$path);
}


#$PATH_INFO = $path;

#$SCRIPT_NAME = $ENV{"SCRIPT_NAME"}.$domain;
$SCRIPT_NAME = $ENV{"SCRIPT_NAME"}.$nameemail;
#$NAME = $ENV{"USERNAME"};
#$EMAIL = $ENV{"EMAIL"}; 

require "/nnnn/nnn/www/cgi-bin/cgi-lib.pl";

 
&ReadParse;


#if (!($tomail =~ /^bugs/)) {
#     $pr = $subject;
#     &read_pr($pr,"");
#     $subject = $fieldvalues{"Synopsis"};
#}
print "<html>\n";
print "<head>\n";
print &PrintHeader;

#if (!$tomail =~ ^/bugs/) {
#     $subject = $fieldvalues{"Synopsis"};
#}
# The domain of the problem report is put in the request field
# example: http://your_server.your_domain/htbin/send_gnats/TEST/ -> -TEST

# Print the document
print <<"EOM";

<TITLE>Mail from the GNATS Problem Report Service for CN (7-Aug-1995)</TITLE>
<!-- Changed by: Susana Fernandez, 31-Mar-1995 -->
<!-- Changed by: Maria Paz Alvarez, 7-Aug-1995 -->


</HEAD>
<BODY>
<H2>Mail from the <a href="http://consult.cern.ch/writeups/gnats/gnats.html">GNATS</a> Problem Report Service for <a href="http://wwwcn.cern.ch/Welcome.html">CN</a></H2>
<HR>



<FORM METHOD="POST" ACTION="http://nnnn.nnn.nn/htbin/mailto.sh">
<INPUT TYPE="text" NAME="from_name" SIZE=25 VALUE=$username >Your name<BR>
<INPUT TYPE="text" NAME="division" VALUE="CN" SIZE=25>Your Division/Group<BR>
<INPUT TYPE="text" NAME="from_mail" SIZE=25 VALUE=$eladdress >Your e-mail address <BR>
<INPUT TYPE="text" NAME="to_mail" VALUE=$tomail SIZE=25>To e-mail address <BR>
<INPUT TYPE="text" NAME="subject" VALUE=$subject SIZE=50>Subject of your mail<BR>
Write here: <TEXTAREA NAME="text" ROWS=10 COLS=80></TEXTAREA>

<P>
<INPUT TYPE="submit" VALUE="Send"> <INPUT TYPE="reset" VALUE="Clear">

<hr>
<address><a href="http://www.cern.ch/CERN/People.html#susana">SFV </a>Jan 1995 - www-support@www.cern.ch</address>
</FORM>
</BODY>

</HTML>


EOM

1;



