homepage Welcome to WebmasterWorld Guest from 50.17.86.12
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
formmail for a sub domain
How to set up formmail.pl
Lorel

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4323023 posted 4:44 pm on Jun 7, 2011 (gmt 0)

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?

 

janharders

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4323023 posted 4:51 pm on Jun 7, 2011 (gmt 0)

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?

Lorel

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4323023 posted 2:36 pm on Jun 8, 2011 (gmt 0)

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.

janharders

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4323023 posted 6:19 pm on Jun 8, 2011 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved