PDA

View Full Version : cgi (what else) help, please


Deb
04-03-1999, 09:02 PM
Almost didn't see this post...

Within the cgi form you have changed what was to:
print MAIL "To: $in{'recipient'}\n";
print MAIL "From: $in{'sender'}\n";

But I can not see where you are defining the recipient or the sender?

Have you considered hardcodeing your email address back into it and making sure that the sender is defined via the "Email" field on the form?

What you show in this post looks correct, but when looking at both files in their entirety it seems the definitions of what it is supposed to with the info is missing.

Tis a thought
Deb

teach1st
04-03-1999, 09:05 PM
I'll give it a shot, Deb. Thanks!

Fred, who has had too much week and not enough end.

teach1st
04-04-1999, 12:23 AM
I've been fooling around with an old 16 bit program of mine (webmainia) to see what kind of custom forms I could make - the program generates the .cgi. Unfortunately, the sendmail part of the script doesn't seem to funcion. It may be because I'm a rank beginner here! Anyway, the .cgi I generated today works - it does generate the response page.
Here's the sendmail part of the script as originally created by Webmania:
$mailer = 'alt-sfa donation inquiry/sendmail';

read(STDIN, $message, $ENV{'CONTENT_LENGTH'});

open(MAIL, "|$mailer -t") | | die "Can't open $mailer!\n";
print MAIL "To: alt-sfa\@mindspring.com\n";
print MAIL "From:WebMania!-" . $ENV{'REMOTE_HOST'} . "\n";
print MAIL "Subject: Form posted: alt-sfa donation inquiry\n\n";
print MAIL "$message\n";
close (MAIL);

Here's changes I made to the script:
$mailprog = '/usr/lib/sendmail';

read(STDIN, $message, $ENV{'CONTENT_LENGTH'});

open(MAIL, "|$mailprog -t") | | die "Can't send mail: $!\n";
print MAIL "To: $in{'recipient'}\n";
print MAIL "From: $in{'sender'}\n";
print MAIL "Subject: Form posted: alt-sfa donation inquiry\n\n";
print MAIL "$message\n";
close (MAIL);

Neither works. Can anybody tell me exactly what dumb mistake I've made? Thanks!

ps: the basic form that addresses this .cgi script is at www.pb5th.com/SFA_Discussion/donate.htm