View Full Version : Error in recipient of form mail

10-16-2004, 05:16 AM
I admit I'm new and confused with cgi scripts. But I have been studying and searching all night. When I attempt to send information in a form I've created (Using formmail), I get this error message: "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."

I've experimented with the recipients array and currently have it at:

@recipients = &fill_recipients('domain.com','sub.domain.com','do maintwo.com,'sub.domaintwo.com');

I also currently have the referers array at:
@referers = ('domain.com','','domain2.com','domain three.com', 'domainfour.com');

I even tried using an optional code on the formmail site to list the specific email addy in the recipient array. Still no go.

Why am I still getting an error? I do have an hidden field in my form which is set to email user@domain.com. (the domain being listed both in the recipients and referers array.)

Help! I'm going nuts here!

10-16-2004, 08:36 AM
I think that all you need in it is @referers since it is using the sub fill_recipeints to create the array using what you have entered in @referers. I don't have the documentation on this script since I use the new NMS FormMail (http://nms-cgi.sourceforge.net/scripts.shtml) version of it that works a bit different and is more secure but I think that if you want to add make different entries that you would remove the &fill_recipients and make it a regular arrary i.e.

@recipients = ('domain.com','sub.domain.com','domaintwo.com,'sub .domaintwo.com');

If you simply want to use what is in the @referers it should look like this:

@recipients = &fill_recipients(@referers);

10-16-2004, 02:20 PM
I tried this suggestion and now I am getting a "500 Internal Server Error" instead of the previous error. It reads

"The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, Postmaster@rameygifts.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log."

10-16-2004, 03:06 PM
This error can be caused by many things:

* script is in DOS format
* path to perl is set wrongly
* there is a typo in the script.

If you know how to use SSH then you can SSH up to the server and run the script from the command line and see what the errors are. You could also check in the apache error logs which may give more details.