I use a CGI script to process quote requests submitted from my website at EMPE Media. When I've made test submissions, they've gone through 9/10 times. I had a couple of other people submit requests that I know haven't come through. What am I missing? Why does it work sometimes and not others?
Thanks for the help,
Meghan
Thanks for the help,
Meghan
Code:
#!/usr/bin/perl
#Run subroutine to turn form data into an array named %in
require "cgi-lib.pl";
&ReadParse;
#Define variables identifying various email paths
$mpmail = "mp\@empemedia.com";
$mp = "EMPE Media";
#Define variable identifying path to sendmail program
$mailprog = '/usr/lib/sendmail';
#Open sendmail program to send message to inquirer
open (MAIL, "|$mailprog -t") || die "Can't open mail program\n";
#Print message headers (To, Reply-To, From, Subject)
print MAIL "To: $in{'email'}\n";
print MAIL "Reply-To: $mpmail\n";
print MAIL "From: $mp\n";
print MAIL "Subject: Thank you for your inquiry\n\n";
#Print body of message
print MAIL <<"PrintTag";
Thank you for your interest in EMPE Media. This e-mail confirms that your inquiry has been submitted. We will review the information you have provided and will be in contact with you shortly. We look forward to working with you.
Sincerely,
Meghan Paladino
EMPE Media
T.704.996.0845
F.803.980.3667
PrintTag
#Close sendmail program, releasing message to be sent
close (MAIL);
#Open sendmail program to send message to EMPE Media
open (MAIL, "|$mailprog -t") || die "Can't open mail program\n";
#Print message headers (To, Reply-To, From, Subject)
print MAIL "To: $mpmail\n";
print MAIL "Reply-To: $in{'email'}\n";
print MAIL "From: $in{'email'}\n";
print MAIL "Subject: Website: Request for Quote\n\n";
#Print body of message
print MAIL <<"PrintTag";
Contact Information:
Name: $in{'name'}
Business: $in{'business'}
Address: $in{'address'}
City, State, Zip: $in{'city'}
Phone: $in{'phone'}
E-Mail: $in{'email'}
Referral Source: $in{'source'}
Keywords Used: $in{'searchwords'}
Web Service Interests are:
New Web: $in{'new_web'}
Redesign: $in{'redesign'}
Maintenance: $in{'maint'}
Web Marketing: $in{'marketing'}
Domain Registration: $in{'domainreg'}
Other: $in{'otherweb'}
Description of Other:
$in{'descotherweb'}
Current Web:
$in{'currentweb'}
Target Audience: $in{'targetaud'}
Number of Pages: $in{'pages'}
Anticipated Deadline: $in{'webdeadline'}
Additional Requirements: $in{'addreq'}
Reference Sites: $in{'samplesites'}
Graphic Design Interests are:
Logo: $in{'logo'}
Business Cards: $in{'buscards'}
Letterhead & Envelopes: $in{'lh&env'}
Brochure: $in{'broch'}
Postcard: $in{'postcard'}
Print Ad: $in{'ad'}
Other: $in{'othergraphic'}
Description of Other: $in{'descothergraph'}
Anticipated Deadline: $in{'graphicdeadline'}
Sample Logos: $in{'samplelogos'}
Other Comments: $in{'comments'}
PrintTag
#Close sendmail program, releasing message to be sent
close (MAIL);
#End of script