Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

formmail for a sub domain

How to set up formmail.pl



4:44 pm on Jun 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I have formmail set up on a main domain and trying to get it set up on a sub domain and it's not working and the host says it's a 3rd party program so they don't support it (the tech support guys tried to figure it out but act like they've never set up formmail before). I'm not a programmer although I understand some of the programming. If someone can help me with this it would be highly appreciated

Here is how I have the @recipients set up in formmail.pl

@recipients = &fill_recipients('maindomain.com','subdomain.com');

No other changes have been made to the formmail.pl

Here is the relevant lines on the HTML form:

<FORM METHOD=POST ACTION="http://www.maindomain.com/cgi-bin/formmail/FormMail.pl">
<input type=hidden name="recipient" value="info@maindomain.com">
<input type=hidden name="return_link_url" value="http://www.subdomain.com/">
<img src='http://www.maindomain.com/cgi-bin/formmail/captcha.cgi' alt="">

The captcha letters show up on the HTML page so I know I've linked to it correctly.

Can anyone see a mistake?


4:51 pm on Jun 7, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

Which formmail.pl are you using? There are several out there.
What happens when you submit the form? is there a 500 Server Error? Do you get an error message from the script? Does the script tell you everything is fine but no mail ever arrives?


2:36 pm on Jun 8, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I'm using this one:

# FormMail Version 1.92 #
# Copyright 1995-2002 Matt Wright mattw@scriptarchive.com

The next to the last time I got an error saying add the sub domain to the recipients so I did that then got an error saying add it to the referrers (Bad Referrer 0- Access Denied). But I don't see anywhere to add it to the referrers and according to the instructions I should only need to add it to the recipients when the sub domain is on the same server.


6:19 pm on Jun 8, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

Ouch. Matt's scripts are really out of date and contain potential security leaks.
You might want to switch to another script. Ask your favorite search engine for "nms formmail". That's a script that should be able to replace Matt's formmail without alot of hassle. It's better and safer.

Matt himself writes:

I would highly recommend downloading the nms versions if you wish to learn CGI programming. The code you find at Matt's Script Archive is not representative of how even I would code these days. My interests and activies have moved on, however, and I just have not found the time to update all of my scripts. One of the major reasons for this is that they work for many people. For this reason, I will continue to provide them to the public, but am also pleased to make you aware of well-coded alternatives.

Maybe that'll already solve your problem -- and even if not, you should probably still update to the nms version.

Featured Threads

Hot Threads This Week

Hot Threads This Month