Gossamer Forum
Home : General : Perl Programming :

Matt's Form Mail script

Quote Reply
Matt's Form Mail script
I'm getting the following error when trying to use Matt's formmail script:


quote:

Error: Bad/No Recipient
There was no recipient or an invalid recipient specified in the data sent to FormMail. Please make sure you have filled in the recipient form field with an e-mail address that has been configured in @recipients. More information on filling in recipient form fields and variables can be found in the README file.
--------------------------------------------------------------------------------

FormMail V1.92 © 1995 - 2002 Matt Wright
A Free Product of Matt's Script Archive, Inc.



This is how I have the form:

quote:

form action="http://www.cricketweb.net/cgi-bin/form/formmail.pl" method="post">

<input type=hidden name="recipient" value="james.nixon@cricketweb.net">
<input type=hidden name="subject" value="Cricket Web - Joining the Team">
<input type=hidden name="env_report" value="REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,HTTP_USER_AGENT">
<input type=hidden name="redirect" value="http://www.cricketweb.net/community/confirm.shtml">



and this is how I have the variables setup:

quote:

############################################################
##################
# Define Variables #
# Detailed Information Found In README File. #

# $mailprog defines the location of your sendmail program on your unix #
# system. The flags -i and -t should be passed to sendmail in order to #
# have it ignore single dots on a line and to read message for recipients #

$mailprog = '/usr/sbin/sendmail -i -t';

# @referers allows forms to be located only on servers which are defined #
# in this field. This security fix from the last version which allowed #
# anyone on any server to use your FormMail script on their web site. #

@referers = ('www.cricketweb.net');

# @recipients defines the e-mail addresses or domain names that e-mail can #
# be sent to. This must be filled in correctly to prevent SPAM and allow #
# valid addresses to receive e-mail. Read the documentation to find out how #
# this variable works!!! It is EXTREMELY IMPORTANT. #
@recipients = &fill_recipients(@referers);

# ACCESS CONTROL FIX: Peter D. Thompson Yezek #
# @valid_ENV allows the sysadmin to define what environment variables can #
# be reported via the env_report directive. This was implemented to fix #
# the problem reported at http://www.securityfocus.com/bid/1187 #

@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT'
);

# Done #
############################################################
##################



What's wrong? Why am I getting that error?


---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Subject Author Views Date
Thread Matt's Form Mail script Philip_Clark 13008 Mar 14, 2003, 2:34 PM
Thread Re: [Philip_Clark] Matt's Form Mail script
Paul 12749 Mar 14, 2003, 2:44 PM
Thread Re: [Paul] Matt's Form Mail script
Philip_Clark 12793 Mar 14, 2003, 2:45 PM
Thread Re: [Philip_Clark] Matt's Form Mail script
Alex 12703 Mar 14, 2003, 4:16 PM
Thread Re: [Alex] Matt's Form Mail script
Paul 12731 Mar 14, 2003, 4:48 PM
Thread Re: [Paul] Matt's Form Mail script
Philip_Clark 12730 Mar 14, 2003, 6:02 PM
Post Re: [Philip_Clark] Matt's Form Mail script
Alex 12682 Mar 15, 2003, 7:52 AM
Post Re: [Philip_Clark] Matt's Form Mail script
Watts 12656 Mar 18, 2003, 11:45 AM
Thread Re: [Philip_Clark] Matt's Form Mail script
Paul 12637 Mar 18, 2003, 11:51 AM
Thread Re: [Paul] Matt's Form Mail script
beetleman 12543 Mar 28, 2003, 8:58 AM
Post Re: [beetleman] Matt's Form Mail script
Paul 12558 Mar 28, 2003, 9:18 AM
Thread Re: [beetleman] Matt's Form Mail script
cwi 12532 Mar 28, 2003, 10:33 AM
Thread Re: [cwi] Matt's Form Mail script
zeroisgod42 12524 Apr 2, 2003, 7:53 PM
Thread Re: [zeroisgod42] Matt's Form Mail script
Olivia 12386 Apr 25, 2003, 5:34 AM
Post Re: [Olivia] Matt's Form Mail script
Paul 12429 Apr 25, 2003, 5:49 AM