[ABE.pm] malformed header from script. Bad header=Recipient names must be specif:

Michael S. Dunsavage mikesd at frontiernet.net
Sat Mar 20 20:40:39 CST 2004


I wrote a cgi script to taek comments and mail them.
malformed header from script. Bad header=Recipient names must be specif:

the from page is http://msdcomputing.com/form.html

the comments.pl script used to send the mail is:



#!/usr/bin/perl

require('/var/www/cgi-bin/cgi-libs/forms-lib.pl');

# Read input from the form.
%input=&GetFormInput();

# Set the recipient, message, and sender.
$recipient = $input{'address'} || "mikesd at msdcomputing.com";
$message = $input{'comments'};
$sender - $ENV{'HTTP_FROM'} || "mikesd at msdcomputing.com";

#Specify the mailer
$MAILER = "/usr/lib/sendmail";

# Compose and send the mail message.
open(MAIL, "|$MAILER -f$sender $recipient");
print MAIL "To: $recipient\n";
print MAIL "Subject:  Comments on your web site\n";
print MAIL "\n";
print MAIL $message;
close (MAIL);
#--------------------------------------------
# Print a confirmation message.
print "Content-type: text/html\n\n";
print <<"EndOfMessage";
<HTML>
<HEAD><TITLE> Comments Sent</TITLE></HEAD>
<BODY>
<H1>Your comments were sent</H1>
The following mail message was sent:
<PRE>
To: $recipient
Subject: Comments on your web site
$message
</PRE>
</HTML>

EndOfMessage


Go ahead and go to http://www.msdcomputing.com/form.html and try to 
submit a comment.

-- 
Michael S. Dunsavage




More information about the ABE-pm mailing list