CGI

by Matthew Ohlman <matthew(at)ohlman.com>

 Date:  Mon, 08 Apr 2002 15:48:07 -0500
 To:  hwg-basics(at)hwg.org
  todo: View Thread, Original

Hi to all you CGI gurus out there. I am having a problem with an
email script. I wrote it in perl, but when I uploaded it (to my cgi-bin),
it didn't work. It gave me this error message:


CGI Error
The specified CGI application misbehaved by not returning a complete set of 
HTTP headers. The headers it did return are:
'sendmail' is not recognized as an internal or external command,
operable program or batch file.


I contacted my host (allsite), and they said that they did support
Sendmail. Here is my code:


#!/usr/bin/perl


{
$sendmail = "sendmail -t -n -oi";
open(MAIL, "| $sendmail") or
         die "content-type: text/plain\n\nCouldn't open sendmail with -f
switch.\n";
$to = ('matthew(at)ohlman.com');
$from = ('Test');
$subject = ('test');
$body = ('test thanks');
}


I have to say that I am VERY new to CGI and perl, and I thought that
I would try this list before any other one.
Thanks!
Matthew




| Matthew Ohlman
| Ohlman Pages
| http://www.ohlman.com/
"There's a difference between a philosophy and a bumper sticker. "
     Charles M. Schulz

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA