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/
---------------
Quote Reply
Re: [Philip_Clark] Matt's Form Mail script In reply to
I know you probably want constructive advice regarding the error but the most contructive advice I can give is not to use Matt's scripts. They are well known to be buggy and insecure.

Last edited by:

Paul: Mar 14, 2003, 2:44 PM
Quote Reply
Re: [Paul] Matt's Form Mail script In reply to
Thanks for the response Paul - what script would you suggest I use? One that's easy to setup ;)

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] Matt's Form Mail script In reply to
Hi,

Have a look at http://nms-cgi.sourceforge.net/ which contains better replacements for most of the things you'll find at Matt's Scripts Archive (nms == "Not Matts Scripts").

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Matt's Form Mail script In reply to
Hehe I like this quote:

Quote:
The scripts are well known amongst the Perl community to be badly written, buggy, and insecure. Anyone asking for support on Matt's scripts in any forum will be told in no uncertain terms that they shouldn't use his scripts.
Quote Reply
Re: [Paul] Matt's Form Mail script In reply to
Thanks for the reply Alex.

That script though is so complicated to setup - has 15 files and so much to do Crazy

Any other decent script that's easy to setup?

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] Matt's Form Mail script In reply to
Which script did you grab? The one on the site only has a single FormMail.pl to setup.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Philip_Clark] Matt's Form Mail script In reply to
I use bnb's form script (www.bignosebird.com) and it's "ok" for small "contact me" types of forms. Not a lot of flexibility, but it works.
Quote Reply
Re: [Philip_Clark] Matt's Form Mail script In reply to
I'm always available for a custom script Wink
Quote Reply
Re: [Paul] Matt's Form Mail script In reply to
In case you don't know, most cgi scripts made are listed at:
http://www.cgi-resources.com/

This site includes the most reputable scripts availible, from companies like Gossamer Threads.

By the way, anybody have anything nice to say about Matt?
beetlemanTongue

Marcus L. Griswold
Quote Reply
Re: [beetleman] Matt's Form Mail script In reply to
Hotscripts.com has more listings =)

http://www.hotscripts.com/...cripts_and_Programs/

Quote:
By the way, anybody have anything nice to say about Matt?

At least he made an effort.
Quote Reply
Re: [beetleman] Matt's Form Mail script In reply to
In Reply To:
In case you don't know, most cgi scripts made are listed at:
http://www.cgi-resources.com/

[..]

By the way, anybody have anything nice to say about Matt?

Matt created and now runs CGI-Resources, so I guess you recommending the site is a compliment in that respect.
Quote Reply
Re: [cwi] Matt's Form Mail script In reply to
but the site itself isnt cluttered with his outdated coding ^_^
Quote Reply
Re: [zeroisgod42] Matt's Form Mail script In reply to
Actually, Matt himself recommends nms-sourceforge scripts rather than his own and he has some of their scripts on his site available for downloading. He also tells folks that his scripts were written when he was in high school, they aren';t very well-written and are terribly unsecure.

I give the guy credit for making the nms scripts available and realizing he was young when he started writing them. It's pretty amazing that so many people are still using his scripts after all this time!

Anyway... The instructions provided for the nms scripts are better than Matt's, the scripts are much more secure, and they've got more features than the originals. They're also smaller. Wink
Quote Reply
Re: [Olivia] Matt's Form Mail script In reply to
The Yahoo result for "nms" says "Scripts by Experts" (or something similar) but some of the nms scripts are still slightly dubious (although a great deal better than Matt's).

For example "cgilib" just wraps features of CGI.pm. They load CGI and CGI::Cookie just to offer a few subroutines like "SetCookiePath()" when you may as well use CGI.pm in your script and use:

-path => '/foo'