Forms/CGI hell...
- Started
- Last post
- 7 Responses
- 5timuli
I have 3 forms in a website, each with a custom CGI script. Each script defines the email address the form contents are sent to.
When I test the forms sending to my Gmail account they arrive but when sending to my work address or the any of the client's addresses they don't arrive.
The hosting is not with any of our ISPs. Our email accounts are also separate.
Is this an email/ISP problem or is it something I've done? Any ideas?
- UndoUndo0
i'd say it is something to do with your office mailserver setup. make sure when the emails are sent you specify a valid 'from ' address
- mrdobolina0
do the formmail scripts have 'referrers'? I have had that problem before. I use php now instead, it is much easier.
- 5timuli0
I've set it up so the script does all the work.
Here's one of them:
#!/usr/bin/perl
use CGI;
# Create the CGI object
my $query = new CGI;# Capture the form results
my $name = $query->param("name");
my $company = $query->param("company");
my $email = $query->param("email");
my $phone = $query->param("phone");
my $subject = $query->param("subject");
my $question = $query->param("question");# Email the form results
open ( MAIL, "| /usr/sbin/sendmail -i -t" );
print MAIL "From: $email\n";
print MAIL "To:
print MAIL "Subject: Contact Form: $subject\n\n";
print MAIL "Name: $name\n";
print MAIL "Company: $company\n";
print MAIL "Email: $email\n";
print MAIL "Phone: $phone\n\n";
print MAIL "$question\n\n";close ( MAIL );
# Redirect to success page
print "Location: http://www.xxxxxxxxx.com/conttha…
- JazX0
you can just download Matt's CGI Script and upload it to your CGI-bin and configure it in your html for the form.
- 5timuli0
I can't use FormMail for all the forms - it's too complex for what I need it to do.
I think what's happening is the email generated by the form is being blocked somehow. I might try adding in some @referers and @recipients and see how it works out.
Thanks for the suggestions so far though, I appreciate it.
- JazX0
that shouldn't matter man, they are all select issues and input issue, the cgi should just push it. there are easy to use perl scripts out there ;)
- 5timuli0
Tried using FormMail and even it's not helping the mails get through. Same problem. This is melting my brain. I'm sure I felt something trickling down my neck there...