EdwardMartinIII
Technical User
Good morning!
I've read through a couple of different strings on a similar problem, but haven't nailed down exactly where my script is having trouble.
An excerpt from the HTML page that calls it:
An excerpt from the CGI file:
Now, the variables seem to be properly assigned values and the HTML part of the show works just dandy (including when I print up varaibales). When I comment out all but the OPEN line, I get my web page, but an error about insufficient paramaters (Sorry, I can't replicate it from this location). When I try everytghing from the OPEN command to the CLOSE command, I receive an error 500 (no big surprise, huh?)
I know my path to perl is good and I'm pretty sure my path to sendmail is good because I copied it from the earthlink hosting help (but if there's a way to verify this in the code, I'd appreciate advice).
My task is simple -- I just want this HTML form to send me the data in a piece of e-mail.
Is there something obvious I'm missing in my script or the HTML? I can post more if it'l help, but these seemed to be the relevent pieces.
Cheers,
Edward
"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
I've read through a couple of different strings on a similar problem, but haven't nailed down exactly where my script is having trouble.
An excerpt from the HTML page that calls it:
Code:
<form method="post" action="[URL unfurl="true"]http://www.petting-zoo.org/cgi/GPMailer.cgi">[/URL]
<table border="1">
<tr>
<td colspan="3">Name: <input type="text" size="75" name="Name" /></td>
An excerpt from the CGI file:
Code:
#!/usr/local/bin/perl -w
use CGI;
$q = new CGI;
$sendmailpath = '/usr/lib/sendmail';
$recipient = "edward\@petting-zoo.org";
$name = $q->param("Name");
$email = $q->param("Email");
open(MAIL, "|$sendmailpath-t $recipient") || die "Can't open $sendmailpath.\n";
print MAIL "Reply-to: $email\n";
print MAIL "From: $email\n";
print MAIL "Subject: Webmail\n\n";
print MAIL "\n\n";
print MAIL "Test: $name";
close (MAIL);
print ("Content-Type: text/html\n\n");
print ("<!DOCTYPE html\n");
print (" PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n");
print (" \"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");[/URL]
print ("\n");
print ("<html xmlns=\"[URL unfurl="true"]http://www.w3.org/1999/xhtml\"[/URL] xml:lang=\"en\" lang=\"en\">\n");
print ("<head>\n");
print (" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n");
print (" <title>Thank you!</title>\n");
print (" <link rel=\"stylesheet\" href=\"../Style2003.css\" type=\"text/css\" />\n");
print ("</head>\n");
print ("<body>\n");
print (" <h1>Thank you!</h1>\n");
...
Now, the variables seem to be properly assigned values and the HTML part of the show works just dandy (including when I print up varaibales). When I comment out all but the OPEN line, I get my web page, but an error about insufficient paramaters (Sorry, I can't replicate it from this location). When I try everytghing from the OPEN command to the CLOSE command, I receive an error 500 (no big surprise, huh?)
I know my path to perl is good and I'm pretty sure my path to sendmail is good because I copied it from the earthlink hosting help (but if there's a way to verify this in the code, I'd appreciate advice).
My task is simple -- I just want this HTML form to send me the data in a piece of e-mail.
Is there something obvious I'm missing in my script or the HTML? I can post more if it'l help, but these seemed to be the relevent pieces.
Cheers,
Edward
"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door