vnomad has asked for the wisdom of the Perl Monks concerning the following question:
Here is the snippet from `amail.cgi' that forwards the request:<FORM METHOD=POST ACTION="http://www.afoto.com/cgi-bin/boo/amail.cgi"> <INPUT TYPE="hidden" NAME="ELIST" VALUE="news-subscribe@afoto.com"> <INPUT TYPE="text" NAME="EMAIL"> <INPUT TYPE="submit" value="SEND"> </FORM>
It works, but only "sort of", and I can't see why. I'm new to Perl, feeling stupid...... $email= $in{'EMAIL'}; $mserv= $in{'ELIST'}; ........ &sendmail($mserv, $email, $subjekt, $bodd); .......... sub sendmail { my($to, $from, $subject, $body) = @_; open (MAIL, "|$sendmail_loc -t -oi") || &err_trap("Can't open +$sendmail_loc!\n"); print MAIL "To: $to\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n"; print MAIL "$body\n"; close MAIL; return 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: form+subscription+Perl+sendmail = TROLL
by tachyon (Chancellor) on Nov 06, 2002 at 00:36 UTC | |
by vnomad (Novice) on Nov 06, 2002 at 01:57 UTC | |
by vnomad (Novice) on Nov 06, 2002 at 04:29 UTC | |
by iburrell (Chaplain) on Nov 06, 2002 at 21:18 UTC | |
by vnomad (Novice) on Nov 07, 2002 at 01:01 UTC | |
|
Re: form+subscription+Perl+sendmail = TROLL
by hossman (Prior) on Nov 06, 2002 at 00:25 UTC |