[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] mailer cgi
- Subject: Re: [cobalt-developers] mailer cgi
- From: Yaron Klinghoffer - Sun Israel - Product Sales + Marketing - Web Consultant <Yaron.Klinghoffer@xxxxxxx>
- Date: Thu Sep 12 00:26:01 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
TIA,
When you enable a user to use cgi, that means that you can run cgi scripts from
the /home/user/cgi-bin directory. (I think that only .cgi and .pl files can be
used though I'm not sure)
About mailing forms you can use the following perl script:
#!/usr/bin/perl
use CGI;
my $q = new CGI;
my $parameter = $q->param("parameter");
print $q->header( "text/html" );
print <<END_OF_HEADER;
<html>
<head><title>sending email</title></head>
<body>
END_OF_HEADER
open MAIL, "| /usr/sbin/sendmail -t -i" or displayError("Could not open
sendmail");
print MAIL <<END_OF_MAIL;
To: $email_address
Subject: $subject
You have filled the form with the following parameter: $parameter
END_OF_MAIL
print $q->p("Thank you.");
print $q->end_html;
exit;
sub displayError{
my $errText = shift(@_);
print "<h1><font color='red'>Error: $errText. Please email the system
administrator at $admin_email</font></h1>";
print "</body></html>";
exit;
}
Hope it helps,
Yaron.
> Hi
>
> Is there a mailer cgi script on the qube3 and if so where is it?
>
> Also I can't get my cgi scripts to run. I get resource not allowed
> errors back in the browser web page.
>
> Any simple guide to getting the Qube to mail forms?
>
> Finally, When the configuration says a user is allowed cgi what exactly
> does thatmean? Does it mean that use can put cgi on their persoanl web
> site? Do I need to create a cgi directory or what?
>
> TIA
>
> --
>
> Colin McQueen : Using an Acorn StrongARM Risc PC
> Web Domain : http://www.mcqueen.uk.net/
> BSc Zoology + Oceanography : PGCE : MSc in CBL/T
>
> _______________________________________________
> cobalt-developers mailing list
> cobalt-developers@xxxxxxxxxxxxxxx
> http://list.cobalt.com/mailman/listinfo/cobalt-developers
--
_____________________________________________________________________
______ SUN MICROSYSTEMS
/_____/\ "We make the Net Work"
/____ \\ \
/_____\ \\ / Yaron Klinghoffer
/_____/ \/ / / Web Consultant
/_____/ / \//\ Product Sales & Marketing
\_____\//\ / /
\_____/ / /\ / Mobile: (972)-58-703268
\_____/ \\ \ Email : yaron.klinghoffer@xxxxxxx
\_____\ \\
\_____\/ Visit us at http://www.sun.com/
_____________________________________________________________________