S
seemanta dutta
Hi,
I have a simple form which when clicked mails a user via the cgi script.
But the problem is that when I run the script from the commandline it works well.
but the moment I try to do it via the form it simply fails.
here's the cgi scriptmail.pl)
#!/usr/bin/perl -w
system("cat mail.txt | /bin/mail -s hello foo\@foobar.com");
printf "Content-type: text/html\n\n";
printf "wait...\n" ;
and here is the formmail.html)
<html>
<p> Just click and Submit!! </p>
<form method=GET action="/cgi-bin/mail.pl">
<input type="submit" name="sub_button" value="Click!" >
</form>
</html>
P.S. I have mail installed on my system and it works fine from the shell.
it does not only via the webserver.
please help,
thanks in advance,
regards,
Seemanta
I have a simple form which when clicked mails a user via the cgi script.
But the problem is that when I run the script from the commandline it works well.
but the moment I try to do it via the form it simply fails.
here's the cgi scriptmail.pl)
#!/usr/bin/perl -w
system("cat mail.txt | /bin/mail -s hello foo\@foobar.com");
printf "Content-type: text/html\n\n";
printf "wait...\n" ;
and here is the formmail.html)
<html>
<p> Just click and Submit!! </p>
<form method=GET action="/cgi-bin/mail.pl">
<input type="submit" name="sub_button" value="Click!" >
</form>
</html>
P.S. I have mail installed on my system and it works fine from the shell.
it does not only via the webserver.
please help,
thanks in advance,
regards,
Seemanta