kickinpretty
Technical User
Hi all...
i have a cgi script which stores variables from a web form in a text.file i would like also to send a confirmation email to the person who submitted the form. my cgi is like this...
#!\Perl\bin\perl
require "subparseform.lib";
&Parse_Form;
$pw = $formdata{'pw'};
$an = $formdata{'an'};
$un = $formdata{'un'};
$v1 = $formdata{'v1'};
$v2 = $formdata{'v2'};
$v3 = $formdata{'v3'};
$v4 = $formdata{'v4'};
$v5 = $formdata{'v5'};
$v6 = $formdata{'v6'};
$v7 = $formdata{'v7'};
$v8 = $formdata{'v8'};
$v9 = $formdata{'v9'};
$v10 = $formdata{'v10'};
$v11 = $formdata{'v11'};
$v12 = $formdata{'v12'};
$v13 = $formdata{'v13'};
$v14 = $formdata{'v14'};
$v15 = $formdata{'v15'};
@New = ("status=sucessfull
login&upw=$pw&uan=$an&uun=$un&l1=$v1&l2=$v2&l3=$v3&l4=$v4&l5
=$v5&l6=$v6&l7=$v7&l8=$v8&l9=$v9&l10=$v10&l11=$v11&l12=$v12&
l13=$v13&l14=$v14&l15=$v15"
open (LOG, ">/$an$pw.txt" || &ErrorMessage;
print LOG "@New";
close (LOG);
print "Content-type: text/html\n\n";
print "status=Success";
sub ErrorMessage {
print "Content-type: text/html\n\n";
print "status=failed - please try again!";
exit;
}
the email variable is v1, what do i need to add to the script to send email, and do i need to install a mail server...im running win98se/outlook express/apache
any help much appreciated
i have a cgi script which stores variables from a web form in a text.file i would like also to send a confirmation email to the person who submitted the form. my cgi is like this...
#!\Perl\bin\perl
require "subparseform.lib";
&Parse_Form;
$pw = $formdata{'pw'};
$an = $formdata{'an'};
$un = $formdata{'un'};
$v1 = $formdata{'v1'};
$v2 = $formdata{'v2'};
$v3 = $formdata{'v3'};
$v4 = $formdata{'v4'};
$v5 = $formdata{'v5'};
$v6 = $formdata{'v6'};
$v7 = $formdata{'v7'};
$v8 = $formdata{'v8'};
$v9 = $formdata{'v9'};
$v10 = $formdata{'v10'};
$v11 = $formdata{'v11'};
$v12 = $formdata{'v12'};
$v13 = $formdata{'v13'};
$v14 = $formdata{'v14'};
$v15 = $formdata{'v15'};
@New = ("status=sucessfull
login&upw=$pw&uan=$an&uun=$un&l1=$v1&l2=$v2&l3=$v3&l4=$v4&l5
=$v5&l6=$v6&l7=$v7&l8=$v8&l9=$v9&l10=$v10&l11=$v11&l12=$v12&
l13=$v13&l14=$v14&l15=$v15"
open (LOG, ">/$an$pw.txt" || &ErrorMessage;
print LOG "@New";
close (LOG);
print "Content-type: text/html\n\n";
print "status=Success";
sub ErrorMessage {
print "Content-type: text/html\n\n";
print "status=failed - please try again!";
exit;
}
the email variable is v1, what do i need to add to the script to send email, and do i need to install a mail server...im running win98se/outlook express/apache
any help much appreciated