[ale] CGI/Sendmail: Premature end of script headers
R S
rsundra at yahoo.com
Wed May 26 16:20:50 EDT 1999
Hello all:
When using a Perl script to send a message from a web page, I keep
getting this error:
Premature end of script headers.
I have checked all of the following:
Script follows:
FTP transfer mode: ASCII
Sendmail path speficied
Print "Content-type:text/html\n\n"; inserted
Buffer flushed: $| = 1;
What else could be wrong? Please cc my mail address. THX
Raj Sundra
SCRIPT FOLLOWS:
#!/usr/bin/perl
$mailprog = '/usr/lib/sendmail';
$| = 1;
open (MAIL, "| $mailprog ") || die "Can't send mail: $!\n";
# print MAIL "HTTP/1.0 200 OK\n";
print MAIL "Content-type:text/html\n\n";
print MAIL "To: $in{'recipient'}\n";
print MAIL "From: $in{'sender'}\n";
print MAIL "Subject: $in{'subject'}\n";
select(MAIL);
print MAIL "\n";
print MAIL "T1: $in{'T1'}\n";
print MAIL "T2: $in{'T2'}\n";
print MAIL "\n";
close (MAIL);
Any help appreciated.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
More information about the Ale
mailing list