Frequently asked questions about the FormMail CGI script.
Follow these steps to set up FormMail:
Upload formmail.pl to /cgi-bin/
chmod 755 formmail.pl
@referers = ('yourdomain.com');
@recipients = ('[email protected]');
<form action="/cgi-bin/formmail.pl" method="post">
<input type="hidden" name="recipient" value="[email protected]">
<input type="hidden" name="subject" value="Contact Form">
<!-- Your form fields -->
<input type="submit" value="Send">
</form>
If you're not receiving emails, check these common issues:
@recipients array@referers$mailprog is correct:
$mailprog = '/usr/lib/sendmail -t';
There's a bug in the URL validation code.
When the code was written, it checks for basic URL syntax before redirecting, ensuring the URL starts with http://. If your URL doesn't start with that, you have two options:
Make sure your redirect URL starts with http:// or https://
Find line 204 and remove the URL check
To modify the script, find this line (around line 204):
if ($CONFIG{'redirect'} =~ /http\:\/\/.*\..*/) {
Change it to:
if ($CONFIG{'redirect'}) {
This removes the URL validation and allows any URL or URI in the redirect form field.